using System;
class Shapes
{
public static void Main()
Console.WriteLine("Enter No Between 1 to 5:");
number1=Convert.ToInt32(Console.ReadLine());
if(number1==1)
{
Console.WriteLine("You can draw a Single line");
}
else if(number1==2)
{
Console.WriteLine("You can draw a Angle");
}
else if(number1==3)
{
Console.WriteLine("You can draw a Traingle");
}
else if(number1==4)
{
Console.WriteLine("You can draw 3 shapes i.e. Square,Rectangle,Trapezoid");
}
else if(number1==5)
{
Console.WriteLine("You can draw Pentagon");
}
else
{
Console.WriteLine("Please Enter No Between 1 to 5");
}
}
}
Output:class Shapes
{
public static void Main()
{
int number1;Console.WriteLine("Enter No Between 1 to 5:");
number1=Convert.ToInt32(Console.ReadLine());
if(number1==1)
{
Console.WriteLine("You can draw a Single line");
}
else if(number1==2)
{
Console.WriteLine("You can draw a Angle");
}
else if(number1==3)
{
Console.WriteLine("You can draw a Traingle");
}
else if(number1==4)
{
Console.WriteLine("You can draw 3 shapes i.e. Square,Rectangle,Trapezoid");
}
else if(number1==5)
{
Console.WriteLine("You can draw Pentagon");
}
else
{
Console.WriteLine("Please Enter No Between 1 to 5");
}
}
}
0 comments:
Post a Comment