Give the output of the following:
51 Likes
Math.pow(36,0.5) gives 6.0 and Math.cbrt(125) gives 5.0. 6.0 + 5.0 = 11.0
Math.ceil(4.2) gives 5.0 and Math.floor(7.9) gives 7.0. 5.0 + 7.0 = 12.0.
Answered By
20 Likes
Which of the following mathematical methods returns only an integer?
The output of the following code is:
System.out.println(Math.ceil(6.4) + Math.floor(-1-2));