Computer Applications
Predict the output of the following:
System.out.println(Math.ceil(65.5));
Java
Java Math Lib Methods
30 Likes
Answer
66.0
Working
Math.ceil method returns the smallest double value that is greater than or equal to the argument and is equal to a mathematical integer. Here 66.0 is the smallest mathematical integer greater than 65.5 so it is the output.
Answered By
15 Likes
Related Questions
Predict the output of the following:
System.out.println(Math.floor(-0.88));Predict the output of the following:
System.out.println(Math.rint(98.5));Write down the syntax for the following Java Mathematical Library function:
To find the smaller between two numbers p and q
Write down the syntax for the following Java Mathematical Library function:
To find the absolute value of a number m