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

12th Sep 2021, 1:38 AM
STOP
STOP - avatar
5 Answers
+ 1
STOP Check my first answer.
12th Sep 2021, 7:30 AM
A͢J
A͢J - avatar
0
STOP Use Math.ceil method like this: (int) Math.ceil(Area)
12th Sep 2021, 2:48 AM
A͢J
A͢J - avatar
0
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ make it as full code please
12th Sep 2021, 4:08 AM
STOP
STOP - avatar
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.
12th Sep 2021, 5:15 AM
A͢J
A͢J - avatar
0
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ Where can i write math.ceil?
12th Sep 2021, 7:21 AM
STOP
STOP - avatar