0
i want to print the result to the nearest integer
https://code.sololearn.com/cY8bqcRnwxbb/?ref=app I want to print the result to the nearest integer (meaning without a comma) What is the mathematical method that rounds numbers? I want like this output: Insert the radius 5 The circle are is : 79 Please send it as a full code
5 Answers
+ 1
STOP
Check my first answer.
0
STOP
Use Math.ceil method like this:
(int) Math.ceil(Area)
0
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ make it as full code please
0
STOP
You already have a full code just change here
System.out.println("The cicle area is: " + Area);
Btw why you don't write your own. I don't think you are learning from others code.
0
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟
Where can i write math.ceil?