- 1
Proyect C# Area of a Circle
Hi, im doing the proyects of C# but i can't do the Area of a Circle proyect, I do it by this way, please help me with the answer and why is that const double pi = 3.14; double radius; 5 double radiusPow = Math.Pow(radius, 2); double result = pi * radiusPow; Console.WriteLine(result);
1 Answer
+ 1
Your code needs to take the radius as input instead of giving a direct value
double radius =Convert.ToDouble(Console.ReadLine());
//double radius = 5