static decimal pi = 3.14159M;
public static void Main()
Console.WriteLine("Please enter [1] to find the surface area of a cone.");
Console.WriteLine("Please enter [2] to find the surface area of a cylinder.");
Console.WriteLine("Please enter [3] to find the surface area of a sphere.");
string choice = Console.ReadLine();
Console.WriteLine("Please enter a value for the Radius");
decimal r = decimal.Parse(Console.ReadLine());
Console.WriteLine("Please enter a value for the Height");
decimal h = decimal.Parse(Console.ReadLine());
Console.WriteLine("The surface area of your cone is: " + Cone(r, h));
Console.WriteLine("Please enter a value for the Radius");
decimal r = decimal.Parse(Console.ReadLine());
Console.WriteLine("Please enter a value for the Height");
decimal h = decimal.Parse(Console.ReadLine());
Console.WriteLine("The surface area of your Cylinder is: " + Cylinder(r, h));
Console.WriteLine("Please enter a value for the Radius");
decimal r = decimal.Parse(Console.ReadLine());
Console.WriteLine("The surface area of your Sphere is: " + Sphere(r));
Console.WriteLine("Please enter a valid choice!");
Console.WriteLine("Press [ENTER] to go back to the start");
Console.WriteLine("Would you like to restart the program? [Y/N]");
string restart = Console.ReadLine();
if (restart == "Y" || restart == "y")
static private decimal Cone(decimal r, decimal h)
double r2 = (double)r * (double)r;
double h2 = (double)h * (double)h;
double slant = Math.Sqrt(r2 + h2);
return pi * r * r + pi * r * (decimal)slant;
static private decimal Cylinder(decimal r, decimal h)
decimal piRH = pi2 * r * h;
static private decimal Sphere(decimal r)