case
1:
Console.WriteLine("You have selected a circle");
Console.WriteLine("Enter the radius of the circle");
radius = Convert.ToDouble(Console.ReadLine());
circleArea = pi * radius;
Console.WriteLine("The area of the circle is {0}", circleArea);
break;
case
2:
Console.WriteLine("You have selected a triangle");
Console.WriteLine("Enter the height of the triangle");
triangleHeight = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Enter the width of the triangle");
triangleWidth = Convert.ToDouble(Console.ReadLine());
triangleArea = (triangleHeight * triangleWidth)/2;
Console.WriteLine("The area of the circle is {0}", triangleArea);
break;
case
3:
Console.WriteLine("You have selected a rectangle");
Console.WriteLine("Enter the height of the rectangle");
rectangleHeight = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Enter the width of the rectangle");
rectangleWidth = Convert.ToDouble(Console.ReadLine());
rectangleArea = (rectangleHeight * rectangleWidth)/2;
Console.WriteLine("The area of the circle is {0}", rectangleArea);
break;
default:
Console.WriteLine("Not a valid option");
break;