{ static decimal pi = 3.14159M;
public static void Main()
Console.WriteLine("if you want to find out the volume of a cone, type x.");
Console.WriteLine("if you want to find out the surface area of a cone, type x1");
Console.WriteLine("if you want to find out the volume of a cylinder, type y.");
Console.WriteLine("if you want to find out the surface area of a cylinger, type y1");
Console.WriteLine("if you want to find out the volume of a sphere, type z.");
Console.WriteLine("if you want to find out the surface of a sphere, type z1");
string ans = Console.ReadLine();
{ Console.WriteLine("What is the area of the base?");
decimal bse = decimal.Parse(Console.ReadLine());
Console.WriteLine("What is height?");
decimal height = decimal.Parse(Console.ReadLine());
decimal output1 = cne(bse, height);
Console.WriteLine("The volume of a cone with a base area of "+bse+" and a height of "+height+" is "+output1.ToString("##.##"));
Console.WriteLine("Want to try again? Type v to continue or anything else to quit.");
string option = Console.ReadLine();
{Console.WriteLine("What is the radius of the cone?");
decimal rad = decimal.Parse(Console.ReadLine());
Console.WriteLine("What is the height?");
decimal he = decimal.Parse(Console.ReadLine());
decimal ouput12 = conesa(rad,he);
Console.WriteLine("The surface area of a cone with a radius of "+rad+" and a height of "+he+" is "+ output12.ToString("##.##"));
Console.WriteLine("Want to try again? Type v to continue or anything else to quit.");
string option = Console.ReadLine();
{Console.WriteLine("Make sure to enter a positive value. Please press enter");
{ Console.WriteLine("What is the area of the base?");
decimal bse2 = decimal.Parse(Console.ReadLine());
Console.WriteLine("What is height?");
decimal height2 = decimal.Parse(Console.ReadLine());
decimal output2 = cyl(bse2, height2);
Console.WriteLine("The volume of a cylinder with a base area of "+bse2+" and a height of "+height2+" is "+output2.ToString("##.##"));
Console.WriteLine("Want to try again? Type v to continue or anything else to quit.");
string option = Console.ReadLine();
{Console.WriteLine("Make sure to enter a positive value. Please press enter.");
{Console.WriteLine("What is the radius?");
decimal r2 = decimal.Parse(Console.ReadLine());
Console.WriteLine("What is the height?");
decimal h2 = decimal.Parse(Console.ReadLine());
decimal ouput13 = cylsa(r2, h2);
Console.WriteLine(output13.ToString("##.##"));
Console.WriteLine("Want to try again? Type v to continue or anything else to quit.");
string option = Console.ReadLine();
{Console.WriteLine("Make sure to enter a positive value. Please press enter.");
{ Console.WriteLine("What is the radius?");
decimal rad1 = decimal.Parse(Console.ReadLine());
decimal output3 = sph(rad1);
Console.WriteLine("The volume of a sphere with a radius of " + rad1+ " is " + output3.ToString("##.##"));
Console.WriteLine("Want to try again? Type v to continue or anything else to quit.");
string option = Console.ReadLine();
{Console.WriteLine("Please enter a positive value. Please press enter.");
{Console.WriteLine("What is the radius?");
decimal r4 = decimal.Parse(Console.ReadLine());
decimal output14 = sphsa(r4);
Console.WriteLine(output14.ToString(Console.ReadLine()));
{Console.WriteLine("Please enter a positive value. Please press enter. ");
static private decimal cne(decimal b,decimal h)
static private decimal conesa(decimal r12, decimal h12)
static private decimal cyl(decimal b2, decimal h2)
static private decimal cylsa(decimal r3,decimal h3)
{decimal rh = 2*r3*h3*pi;
static private decimal sph (decimal rad1)
static private decimal sphsa(decimal rd)