Computer Applications
Predict the output of the following Java program snippet:
System.out.println(Math.ceil(3.4)+Math.pow(2,3));
Java
Java Math Lib Methods
ICSE 2018
25 Likes
Answer
12.0
Working
Math.ceil(3.4) gives 4.0 and Math.pow(2,3) gives 8.0. So the output is 4.0 + 8.0 = 12.0.
Answered By
13 Likes