0
What is the error :(?
2 odpowiedzi
+ 2
The formula is correct, can you tell me what is the problem you're dealing with? I tried to input 3, and got correct result BTW.
+ 2
it is ok.
+ you can use Math.PI
//double area = radius * radius * 3.14159;
double area = radius * radius * Math.PI;
and add spaces after "..radius " and " is "
for better output format:
//System.out.println("The area for the circle of radius" + radius + "is" + area);
System.out.println("The area for the circle of radius " + radius + " is " + area);