public static void Main(string[] args)
Console.WriteLine("[1] Area of Circle");
Console.WriteLine("[2] Area of Rectangle");
Console.WriteLine("[3] Area of Triangle");
Console.Write("Enter your option: ");
option =Convert.ToInt32(Console.ReadLine());
Console.Write("Enter the radius : ");
radius = Convert.ToInt32(Console.ReadLine());
circle = (3.14) * radius * radius;
Console.WriteLine("The Area of circle of given radius is = " + circle);
Console.WriteLine("Zero or negative cannot be accepted. ");
} else if (option == 2) {
Console.Write("Enter length : ");
lenght=Convert.ToInt32(Console.ReadLine());
Console.Write("Enter width : ");
width=Convert.ToInt32(Console.ReadLine());
if ((lenght > 0) && ( width > 0))
rectangle = lenght * width;
Console.WriteLine("The area of rectangle is = " + rectangle);
Console.WriteLine("Zero or negative cannot be accepted. ");
} else if (option == 3) {
Console.Write("Enter Base : ");
Base = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter Height : ");
height = Convert.ToInt32(Console.ReadLine());
if ((Base > 0) && ( height > 0))
triangle = Base * height / 2;
Console.WriteLine("The area of triangle is = " + triangle);
Console.WriteLine("Zero or negative cannot be accepted. ");