Cloud Stack Ninja

The first picture is what my professor wants us to do: https://prnt.sc/v1drxs

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...");

Console.ReadKey();

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: https://stackoverflow.com/questions/64409213/how-do-i-simply-add-two-decimal-places-and-round-to-the-nearest-two-decimal-plac

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: