+ 1

I need help coding to find the area of a circle in C# can some1 help?

Pls

24th Sep 2022, 5:48 PM
MCGDGamer
MCGDGamer - avatar
3 Réponses
+ 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!
24th Sep 2022, 6:03 PM
Suparna Das
Suparna Das - avatar
+ 6
Good 👍🏻 it worked
24th Sep 2022, 6:28 PM
Suparna Das
Suparna Das - avatar
+ 2
Thanks, I've been stuck for awhile and this helps a lot
24th Sep 2022, 6:24 PM
MCGDGamer
MCGDGamer - avatar