+ 1

I dont know what's wrong with this code

{ const double pi = 3.14; double radius; double area; Console.WriteLine("Enter a value for radius"); radius = Convert.ToDouble(Console.ReadLine()); area = pi * radius * radius; Console.WriteLine("the area of the circle is {0}" ,area); //your code goes here }

19th Jan 2022, 7:57 AM
Badad
2 Answers
+ 3
I can see a error, If you're talking about c# project, Then it is not necessary to write, Console.WriteLine("Enter a value of radius");
19th Jan 2022, 8:13 AM
š“š“·š“¼š“±š“²š““š“Ŗ (Anshika)
š“š“·š“¼š“±š“²š““š“Ŗ (Anshika) - avatar
+ 7
Your output should be same as expected output I mean you just need to print the variable age without other strings. Console.WriteLine(age);
19th Jan 2022, 8:07 AM
Simba
Simba - avatar