SlideShare une entreprise Scribd logo
1  sur  2
Télécharger pour lire hors ligne
Paste the following code in the w3 editor
using System;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Rectangle rectangle1 = new Rectangle(8,8);
rectangle1.display();
}
}
class Rectangle
{
int length;
int width;
public Rectangle(int l, int w)
{
length = l;
width = w;
}
public int area()
{
return length * width;
}
public void display()
{
string line = "";
for (int i = 0; i < width+2; i++)
{
if (i == 0 || i == width+1)
{
for (int j = 0; j < length*2; j++)
{
line = line + "-";
}
Console.WriteLine(line);
line = "";
}
else
{
for (int j = 0; j < length*2; j++)
{
if (j == 0 || j == length*2-1)
{
line=line+"|";
}
else
{
line = line+" ";
}
}
Console.WriteLine(line);
line = "";
}
}
}
}
}
2. In the main function, create two new rectangles rectangle2 and rectangle3 with different
dimensions than the first and different dimensions from each other. Print both of these rectangles
to the screen using the display function.

Contenu connexe

Similaire à Paste the following code in the w3 editorusing System;namespace .pdf

Tools and Techniques for Understanding Threading Behavior in Android*
Tools and Techniques for Understanding Threading Behavior in Android*Tools and Techniques for Understanding Threading Behavior in Android*
Tools and Techniques for Understanding Threading Behavior in Android*Intel® Software
 
please sir i want to comments of every code what i do in eachline . in this w...
please sir i want to comments of every code what i do in eachline . in this w...please sir i want to comments of every code what i do in eachline . in this w...
please sir i want to comments of every code what i do in eachline . in this w...hwbloom27
 
UserInputHandlerjava package midterm2023 import javautil.pdf
UserInputHandlerjava package midterm2023 import javautil.pdfUserInputHandlerjava package midterm2023 import javautil.pdf
UserInputHandlerjava package midterm2023 import javautil.pdfadityknits
 
Chapter i(introduction to java)
Chapter i(introduction to java)Chapter i(introduction to java)
Chapter i(introduction to java)Chhom Karath
 
Operators
OperatorsOperators
Operatorsvvpadhu
 
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerKOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerAiman Hud
 
C++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdfC++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdfyamew16788
 
Java_practical_handbook
Java_practical_handbookJava_practical_handbook
Java_practical_handbookManusha Dilan
 
C# I need assitance on my code.. Im getting an error message Us.pdf
C# I need assitance on my code.. Im getting an error message Us.pdfC# I need assitance on my code.. Im getting an error message Us.pdf
C# I need assitance on my code.. Im getting an error message Us.pdfeyezoneamritsar
 
Oops lab manual2
Oops lab manual2Oops lab manual2
Oops lab manual2Mouna Guru
 
2014 computer science_question_paper
2014 computer science_question_paper2014 computer science_question_paper
2014 computer science_question_papervandna123
 
Lecture 9_Classes.pptx
Lecture 9_Classes.pptxLecture 9_Classes.pptx
Lecture 9_Classes.pptxNelyJay
 
Arrays, Structures And Enums
Arrays, Structures And EnumsArrays, Structures And Enums
Arrays, Structures And EnumsBhushan Mulmule
 
import java.uti-WPS Office.docx
import java.uti-WPS Office.docximport java.uti-WPS Office.docx
import java.uti-WPS Office.docxKatecate1
 

Similaire à Paste the following code in the w3 editorusing System;namespace .pdf (20)

Java practical
Java practicalJava practical
Java practical
 
Tools and Techniques for Understanding Threading Behavior in Android*
Tools and Techniques for Understanding Threading Behavior in Android*Tools and Techniques for Understanding Threading Behavior in Android*
Tools and Techniques for Understanding Threading Behavior in Android*
 
please sir i want to comments of every code what i do in eachline . in this w...
please sir i want to comments of every code what i do in eachline . in this w...please sir i want to comments of every code what i do in eachline . in this w...
please sir i want to comments of every code what i do in eachline . in this w...
 
C#.net
C#.netC#.net
C#.net
 
UserInputHandlerjava package midterm2023 import javautil.pdf
UserInputHandlerjava package midterm2023 import javautil.pdfUserInputHandlerjava package midterm2023 import javautil.pdf
UserInputHandlerjava package midterm2023 import javautil.pdf
 
Chapter i(introduction to java)
Chapter i(introduction to java)Chapter i(introduction to java)
Chapter i(introduction to java)
 
Sam wd programs
Sam wd programsSam wd programs
Sam wd programs
 
Operators
OperatorsOperators
Operators
 
Pemrograman visual
Pemrograman visualPemrograman visual
Pemrograman visual
 
Base de-datos
Base de-datosBase de-datos
Base de-datos
 
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerKOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
 
Ch3
Ch3Ch3
Ch3
 
C++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdfC++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdf
 
Java_practical_handbook
Java_practical_handbookJava_practical_handbook
Java_practical_handbook
 
C# I need assitance on my code.. Im getting an error message Us.pdf
C# I need assitance on my code.. Im getting an error message Us.pdfC# I need assitance on my code.. Im getting an error message Us.pdf
C# I need assitance on my code.. Im getting an error message Us.pdf
 
Oops lab manual2
Oops lab manual2Oops lab manual2
Oops lab manual2
 
2014 computer science_question_paper
2014 computer science_question_paper2014 computer science_question_paper
2014 computer science_question_paper
 
Lecture 9_Classes.pptx
Lecture 9_Classes.pptxLecture 9_Classes.pptx
Lecture 9_Classes.pptx
 
Arrays, Structures And Enums
Arrays, Structures And EnumsArrays, Structures And Enums
Arrays, Structures And Enums
 
import java.uti-WPS Office.docx
import java.uti-WPS Office.docximport java.uti-WPS Office.docx
import java.uti-WPS Office.docx
 

Plus de alicesilverblr

Part B Vulnerability Management Plan To prepare a vulnerability.pdf
Part B Vulnerability Management Plan To prepare a vulnerability.pdfPart B Vulnerability Management Plan To prepare a vulnerability.pdf
Part B Vulnerability Management Plan To prepare a vulnerability.pdfalicesilverblr
 
Part 1 � 10 marksAster Turane Computers uses a perpetual accountin.pdf
Part 1 � 10 marksAster Turane Computers uses a perpetual accountin.pdfPart 1 � 10 marksAster Turane Computers uses a perpetual accountin.pdf
Part 1 � 10 marksAster Turane Computers uses a perpetual accountin.pdfalicesilverblr
 
Part 1 Refer to pages 92-100 in your text as you answer these quest.pdf
Part 1 Refer to pages 92-100 in your text as you answer these quest.pdfPart 1 Refer to pages 92-100 in your text as you answer these quest.pdf
Part 1 Refer to pages 92-100 in your text as you answer these quest.pdfalicesilverblr
 
Para arz B�y�k Buhran srasnda d�t� ��nk� __________. Yant se�enekl.pdf
Para arz B�y�k Buhran srasnda d�t� ��nk� __________. Yant se�enekl.pdfPara arz B�y�k Buhran srasnda d�t� ��nk� __________. Yant se�enekl.pdf
Para arz B�y�k Buhran srasnda d�t� ��nk� __________. Yant se�enekl.pdfalicesilverblr
 
Pandas is a Python library used for working with data sets. It has f.pdf
Pandas is a Python library used for working with data sets. It has f.pdfPandas is a Python library used for working with data sets. It has f.pdf
Pandas is a Python library used for working with data sets. It has f.pdfalicesilverblr
 
page 6-7 Fraud (previously referred to as irregularities) -Inten.pdf
page 6-7 Fraud (previously referred to as irregularities) -Inten.pdfpage 6-7 Fraud (previously referred to as irregularities) -Inten.pdf
page 6-7 Fraud (previously referred to as irregularities) -Inten.pdfalicesilverblr
 
page 9 STAFF DISCUSSION OF THE RISK OF MATERIAL MISSTATEMENT DUE T.pdf
page 9 STAFF DISCUSSION OF THE RISK OF MATERIAL MISSTATEMENT DUE T.pdfpage 9 STAFF DISCUSSION OF THE RISK OF MATERIAL MISSTATEMENT DUE T.pdf
page 9 STAFF DISCUSSION OF THE RISK OF MATERIAL MISSTATEMENT DUE T.pdfalicesilverblr
 
page 8 III. OUTLINE OF STATEMENT ON AUDITING STANDARDS NO. 99, CON.pdf
page 8 III. OUTLINE OF STATEMENT ON AUDITING STANDARDS NO. 99, CON.pdfpage 8 III. OUTLINE OF STATEMENT ON AUDITING STANDARDS NO. 99, CON.pdf
page 8 III. OUTLINE OF STATEMENT ON AUDITING STANDARDS NO. 99, CON.pdfalicesilverblr
 
page 12 B. Conflicting or missing audit evidence, such as (1) Mis.pdf
page 12 B. Conflicting or missing audit evidence, such as (1) Mis.pdfpage 12 B. Conflicting or missing audit evidence, such as (1) Mis.pdf
page 12 B. Conflicting or missing audit evidence, such as (1) Mis.pdfalicesilverblr
 
page 10 (4) In-house legal counsel. E. Be aware in evaluating ma.pdf
page 10 (4) In-house legal counsel. E. Be aware in evaluating ma.pdfpage 10 (4) In-house legal counsel. E. Be aware in evaluating ma.pdf
page 10 (4) In-house legal counsel. E. Be aware in evaluating ma.pdfalicesilverblr
 
p14-15 34. The risk of fraud may be so high as to cause the audi.pdf
p14-15 34. The risk of fraud may be so high as to cause the audi.pdfp14-15 34. The risk of fraud may be so high as to cause the audi.pdf
p14-15 34. The risk of fraud may be so high as to cause the audi.pdfalicesilverblr
 
p13 29. The auditor should evaluate whether analytical procedure.pdf
p13 29. The auditor should evaluate whether analytical procedure.pdfp13 29. The auditor should evaluate whether analytical procedure.pdf
p13 29. The auditor should evaluate whether analytical procedure.pdfalicesilverblr
 
P1 Una entidad adquiere un elemento de equipo que no es de naturale.pdf
P1 Una entidad adquiere un elemento de equipo que no es de naturale.pdfP1 Una entidad adquiere un elemento de equipo que no es de naturale.pdf
P1 Una entidad adquiere un elemento de equipo que no es de naturale.pdfalicesilverblr
 
Owner, Andy Pforzheimer, holds a meeting with his employees in which.pdf
Owner, Andy Pforzheimer, holds a meeting with his employees in which.pdfOwner, Andy Pforzheimer, holds a meeting with his employees in which.pdf
Owner, Andy Pforzheimer, holds a meeting with his employees in which.pdfalicesilverblr
 
ow Effective Managers Use Information Systems Advances in computer-b.pdf
ow Effective Managers Use Information Systems Advances in computer-b.pdfow Effective Managers Use Information Systems Advances in computer-b.pdf
ow Effective Managers Use Information Systems Advances in computer-b.pdfalicesilverblr
 
Overview of the Animal Kingdom (ch. 32)a. Describe the origins and.pdf
Overview of the Animal Kingdom (ch. 32)a. Describe the origins and.pdfOverview of the Animal Kingdom (ch. 32)a. Describe the origins and.pdf
Overview of the Animal Kingdom (ch. 32)a. Describe the origins and.pdfalicesilverblr
 
Over the past ten years, if you had an innovative product like �EarP.pdf
Over the past ten years, if you had an innovative product like �EarP.pdfOver the past ten years, if you had an innovative product like �EarP.pdf
Over the past ten years, if you had an innovative product like �EarP.pdfalicesilverblr
 
OTEL RIXOS PREMIUM BELEK OTEL POZSYON PAZARLAMA EKB COVID-19d.pdf
OTEL RIXOS PREMIUM BELEK OTEL POZSYON PAZARLAMA EKB COVID-19d.pdfOTEL RIXOS PREMIUM BELEK OTEL POZSYON PAZARLAMA EKB COVID-19d.pdf
OTEL RIXOS PREMIUM BELEK OTEL POZSYON PAZARLAMA EKB COVID-19d.pdfalicesilverblr
 
other information provided is the answer for T T=-0.62 i still ne.pdf
other information provided is the answer for T T=-0.62 i still ne.pdfother information provided is the answer for T T=-0.62 i still ne.pdf
other information provided is the answer for T T=-0.62 i still ne.pdfalicesilverblr
 
Please complete the fill in the box exercise by identify the federal.pdf
Please complete the fill in the box exercise by identify the federal.pdfPlease complete the fill in the box exercise by identify the federal.pdf
Please complete the fill in the box exercise by identify the federal.pdfalicesilverblr
 

Plus de alicesilverblr (20)

Part B Vulnerability Management Plan To prepare a vulnerability.pdf
Part B Vulnerability Management Plan To prepare a vulnerability.pdfPart B Vulnerability Management Plan To prepare a vulnerability.pdf
Part B Vulnerability Management Plan To prepare a vulnerability.pdf
 
Part 1 � 10 marksAster Turane Computers uses a perpetual accountin.pdf
Part 1 � 10 marksAster Turane Computers uses a perpetual accountin.pdfPart 1 � 10 marksAster Turane Computers uses a perpetual accountin.pdf
Part 1 � 10 marksAster Turane Computers uses a perpetual accountin.pdf
 
Part 1 Refer to pages 92-100 in your text as you answer these quest.pdf
Part 1 Refer to pages 92-100 in your text as you answer these quest.pdfPart 1 Refer to pages 92-100 in your text as you answer these quest.pdf
Part 1 Refer to pages 92-100 in your text as you answer these quest.pdf
 
Para arz B�y�k Buhran srasnda d�t� ��nk� __________. Yant se�enekl.pdf
Para arz B�y�k Buhran srasnda d�t� ��nk� __________. Yant se�enekl.pdfPara arz B�y�k Buhran srasnda d�t� ��nk� __________. Yant se�enekl.pdf
Para arz B�y�k Buhran srasnda d�t� ��nk� __________. Yant se�enekl.pdf
 
Pandas is a Python library used for working with data sets. It has f.pdf
Pandas is a Python library used for working with data sets. It has f.pdfPandas is a Python library used for working with data sets. It has f.pdf
Pandas is a Python library used for working with data sets. It has f.pdf
 
page 6-7 Fraud (previously referred to as irregularities) -Inten.pdf
page 6-7 Fraud (previously referred to as irregularities) -Inten.pdfpage 6-7 Fraud (previously referred to as irregularities) -Inten.pdf
page 6-7 Fraud (previously referred to as irregularities) -Inten.pdf
 
page 9 STAFF DISCUSSION OF THE RISK OF MATERIAL MISSTATEMENT DUE T.pdf
page 9 STAFF DISCUSSION OF THE RISK OF MATERIAL MISSTATEMENT DUE T.pdfpage 9 STAFF DISCUSSION OF THE RISK OF MATERIAL MISSTATEMENT DUE T.pdf
page 9 STAFF DISCUSSION OF THE RISK OF MATERIAL MISSTATEMENT DUE T.pdf
 
page 8 III. OUTLINE OF STATEMENT ON AUDITING STANDARDS NO. 99, CON.pdf
page 8 III. OUTLINE OF STATEMENT ON AUDITING STANDARDS NO. 99, CON.pdfpage 8 III. OUTLINE OF STATEMENT ON AUDITING STANDARDS NO. 99, CON.pdf
page 8 III. OUTLINE OF STATEMENT ON AUDITING STANDARDS NO. 99, CON.pdf
 
page 12 B. Conflicting or missing audit evidence, such as (1) Mis.pdf
page 12 B. Conflicting or missing audit evidence, such as (1) Mis.pdfpage 12 B. Conflicting or missing audit evidence, such as (1) Mis.pdf
page 12 B. Conflicting or missing audit evidence, such as (1) Mis.pdf
 
page 10 (4) In-house legal counsel. E. Be aware in evaluating ma.pdf
page 10 (4) In-house legal counsel. E. Be aware in evaluating ma.pdfpage 10 (4) In-house legal counsel. E. Be aware in evaluating ma.pdf
page 10 (4) In-house legal counsel. E. Be aware in evaluating ma.pdf
 
p14-15 34. The risk of fraud may be so high as to cause the audi.pdf
p14-15 34. The risk of fraud may be so high as to cause the audi.pdfp14-15 34. The risk of fraud may be so high as to cause the audi.pdf
p14-15 34. The risk of fraud may be so high as to cause the audi.pdf
 
p13 29. The auditor should evaluate whether analytical procedure.pdf
p13 29. The auditor should evaluate whether analytical procedure.pdfp13 29. The auditor should evaluate whether analytical procedure.pdf
p13 29. The auditor should evaluate whether analytical procedure.pdf
 
P1 Una entidad adquiere un elemento de equipo que no es de naturale.pdf
P1 Una entidad adquiere un elemento de equipo que no es de naturale.pdfP1 Una entidad adquiere un elemento de equipo que no es de naturale.pdf
P1 Una entidad adquiere un elemento de equipo que no es de naturale.pdf
 
Owner, Andy Pforzheimer, holds a meeting with his employees in which.pdf
Owner, Andy Pforzheimer, holds a meeting with his employees in which.pdfOwner, Andy Pforzheimer, holds a meeting with his employees in which.pdf
Owner, Andy Pforzheimer, holds a meeting with his employees in which.pdf
 
ow Effective Managers Use Information Systems Advances in computer-b.pdf
ow Effective Managers Use Information Systems Advances in computer-b.pdfow Effective Managers Use Information Systems Advances in computer-b.pdf
ow Effective Managers Use Information Systems Advances in computer-b.pdf
 
Overview of the Animal Kingdom (ch. 32)a. Describe the origins and.pdf
Overview of the Animal Kingdom (ch. 32)a. Describe the origins and.pdfOverview of the Animal Kingdom (ch. 32)a. Describe the origins and.pdf
Overview of the Animal Kingdom (ch. 32)a. Describe the origins and.pdf
 
Over the past ten years, if you had an innovative product like �EarP.pdf
Over the past ten years, if you had an innovative product like �EarP.pdfOver the past ten years, if you had an innovative product like �EarP.pdf
Over the past ten years, if you had an innovative product like �EarP.pdf
 
OTEL RIXOS PREMIUM BELEK OTEL POZSYON PAZARLAMA EKB COVID-19d.pdf
OTEL RIXOS PREMIUM BELEK OTEL POZSYON PAZARLAMA EKB COVID-19d.pdfOTEL RIXOS PREMIUM BELEK OTEL POZSYON PAZARLAMA EKB COVID-19d.pdf
OTEL RIXOS PREMIUM BELEK OTEL POZSYON PAZARLAMA EKB COVID-19d.pdf
 
other information provided is the answer for T T=-0.62 i still ne.pdf
other information provided is the answer for T T=-0.62 i still ne.pdfother information provided is the answer for T T=-0.62 i still ne.pdf
other information provided is the answer for T T=-0.62 i still ne.pdf
 
Please complete the fill in the box exercise by identify the federal.pdf
Please complete the fill in the box exercise by identify the federal.pdfPlease complete the fill in the box exercise by identify the federal.pdf
Please complete the fill in the box exercise by identify the federal.pdf
 

Dernier

Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17Celine George
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1GloryAnnCastre1
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvRicaMaeCastro1
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 

Dernier (20)

Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 

Paste the following code in the w3 editorusing System;namespace .pdf

  • 1. Paste the following code in the w3 editor using System; namespace HelloWorld { class Program { static void Main(string[] args) { Rectangle rectangle1 = new Rectangle(8,8); rectangle1.display(); } } class Rectangle { int length; int width; public Rectangle(int l, int w) { length = l; width = w; } public int area() { return length * width; } public void display() { string line = ""; for (int i = 0; i < width+2; i++)
  • 2. { if (i == 0 || i == width+1) { for (int j = 0; j < length*2; j++) { line = line + "-"; } Console.WriteLine(line); line = ""; } else { for (int j = 0; j < length*2; j++) { if (j == 0 || j == length*2-1) { line=line+"|"; } else { line = line+" "; } } Console.WriteLine(line); line = ""; } } } } } 2. In the main function, create two new rectangles rectangle2 and rectangle3 with different dimensions than the first and different dimensions from each other. Print both of these rectangles to the screen using the display function.