+ 1
Issue with Area of a Circle Test
I solved 5 of the 6 Test Inputs, but it errors on Test Input #2 = 6.4 Can anyone help me understand why? The error is very confusing. Here is my code: const double pi = 3.14; double radius = Convert.ToInt32(Console.ReadLine()); double area = (radius*radius)*pi; Console.WriteLine(area);
1 Réponse
+ 3
6.4 is a float value. Don't convert input to integer.