namespace CubeAreaCalculator
public const double PI = 3.14159265358979;
public static void Main(string[] args)
Console.WriteLine("Hello, " +
"Do you want to calculate the volume of a box or a sphere??");
string box = Console.ReadLine();
bool b = Convert.ToBoolean(box);
Console.Write("You choose the box. ");
Console.Write("Please insert the length: ");
string length = Console.ReadLine();
double len = Convert.ToDouble(length);
Console.Write("Now, insert the width: ");
string width = Console.ReadLine();
double wid = Convert.ToDouble(width);
Console.Write("Finally, insert the height: ");
string height = Console.ReadLine();
double hei = Convert.ToDouble(height);
volume = len * wid * hei;
Console.WriteLine("The volume of the box is: {0} * {1} * {2} = {3}", len, wid, hei, volume);
string sphere = Console.ReadLine();
bool sph = Convert.ToBoolean(sphere);
Console.WriteLine("You choose the sphere. ");
Console.Write("Please insert the radius: ");
string radius = Console.ReadLine();
double rad = Convert.ToDouble(radius);
volume2 = 4 / 3 * PI * rad;
Console.Write(" The volume of the sphere is: {0} / {1} * {2} * {3} = {4}", 4, 3, PI, rad);