{ static decimal pi = 3.14159M;
static private decimal cone(decimal r, decimal h)
static private decimal cone2(decimal r, decimal h)
{return pi*r*h + pi*r*r;}
static private decimal cylinder(decimal r, decimal h)
static private decimal cylinder2(decimal r, decimal h)
{return pi*2*r*r + pi*r*h*2;}
static private decimal sphere(decimal r)
static private decimal area(decimal r)
public static void Main()
Console.WriteLine("Hello, please choose an option from the menu");
Console.WriteLine("If you would like to calculate the density of a cone, please press 1.");
Console.WriteLine("If you would like to calculate the volume and surface area of a cylinder , please press 2.");
Console.WriteLine ("If you would like to calculate the volume and surface area of a sphere, please press 3.");
string choice = Console.ReadLine();
{Console.WriteLine("Please Enter the radius of your cone.");
decimal radius = decimal.Parse(Console.ReadLine());
Console.WriteLine("Please Enter the height of your cone.");
decimal height = decimal.Parse(Console.ReadLine());
Console.WriteLine("The volume of your cone is: " + cone(radius, height).ToString("##.##"));
Console.WriteLine("The surface area of your cone is: " + cone2(radius, height).ToString("##.##"));
{Console.WriteLine("Please Enter the radius of your cylinder.");
decimal radius = decimal.Parse(Console.ReadLine());
Console.WriteLine("Please Enter the height of your cylinder.");
decimal height = decimal.Parse(Console.ReadLine());
Console.WriteLine("The volume of your cylinder is: " + cylinder(radius, height).ToString("##.##"));
Console.WriteLine("The surface area of your cylinder is: " + cylinder2(radius, height).ToString("##.##"));
{Console.WriteLine("Please Enter the radius of your sphere.");
decimal radius = decimal.Parse(Console.ReadLine());
Console.WriteLine("The volume of your sphere is: " + sphere(radius).ToString("##.##"));
Console.WriteLine("The surface area of your sphere is: " + area(radius).ToString("##.##"));
Console.WriteLine("Would you like to play again? y/n");
string decision = Console.ReadLine();
if (decision == "Y" || decision == "y")