- 1
Area of a Circle in Test Case #2 for C# is bugged!
The code below is my code for the question, please copy and paste it into the code of C#: Area of a Circle project. Almost all test cases are correct except for Test Case #2 where there is tons of bugs! static void Main(string[] args) { const double pi = 3.14; double radius; radius = Convert.ToInt32(Console.ReadLine()); double output = pi * radius * radius; Console.WriteLine(output); }
2 Réponses
+ 2
Radius is of type double – therefore convert the input to to double (not to integer)
0
Thanks!