Skip to content

Instantly share code, notes, and snippets.

@RMcGee
Created September 11, 2013 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RMcGee/6527315 to your computer and use it in GitHub Desktop.
Save RMcGee/6527315 to your computer and use it in GitHub Desktop.
//Volume of a Cone
Double radius, height, volume;
Console.WriteLine("Cone volume calculator");
Console.WriteLine("Enter radius");
radius = Double.Parse(Console.ReadLine());
Console.WriteLine("Enter height");
height = Double.Parse(Console.ReadLine());
volume = 1.0 / 3.0 * Math.PI * radius * radius;
Console.WriteLine("Volume is {0:0.00}", volume);
Console.ReadLine();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment