18th Oct 2019, 12:47 AM
Raghad
Raghad - avatar
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.
18th Oct 2019, 3:56 AM
Ipang
+ 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);
18th Oct 2019, 5:56 AM
zemiak