Cloud Stack Ninja

The first picture is what my professor wants us to do:

Here is MY code:

Console.Write("Enter the radius for a circle: ");

double radius = Convert.ToDouble(Console.ReadLine());
double diameter = 2 * radius;
double circumference = Convert.ToDouble(Math.PI * diameter);

Console.WriteLine("\nThe radius of the circle is " + radius + " units.");
Console.WriteLine("The diameter of the circle is " + diameter + " units.");
Console.WriteLine("The circumference of the circle is " + circumference + " units.");

Console.Write("\nPress any key to continue...");


What I have tried:

I am using Microsoft Visual Studio 2017. I'm very new to coding. Help would be appreciated, thanks!

Read more here:

Content Attribution

This content was originally published by Allyson Bryant at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: