b. Find the output of
i. System.out.println(Math.round(Math.min(Math.floor( 5.7). Math.ceil(5.2))));
11. S
Out
Answers
Answered by
1
5
Math.floor(5.7) will give 5.0
Math.ceil(5.2) will give 6.0
Then
Math.min(5.0, 6.0) will give 5.0
Then
Math.round(5.0) will give 5
Answered by
0
Answer:
5.0
Explanation:
math .floor will convert 5.7 to 5.0
math .ceil will convert 5.2 to 6.0
math .min will choose 5.0 out of 5.0 and 6.0 as 5.0 is small
now math .abs will 5.0 only as it is positive
hence 5.0 is the answer
Similar questions