+ 1
I need help coding to find the area of a circle in C# can some1 help?
Pls
3 Respuestas
+ 6
Can you share your code here where you are getting error?
Ok the question was asked for the area of circle
First declare a const variable defining the value of pi -> 3.14
Then declare a variable with datatype double
after that take a number input and convert it to double data type
eg:-
double radius = Convert.ToDouble(Console.ReadLine());
After that take another variable result
With datatype double and calculate the pi * radius * radius
Then Display the result
using -> Console.WriteLine(result);
Hope all these hints help!
+ 6
Good 👍🏻 it worked
+ 2
Thanks, I've been stuck for awhile and this helps a lot