give the output
float x=-7.87;
system.out.println(math.ceil(x));
system.out.println(math.floor(x));
Answers
Answered by
9
Explanation:
- -7
- -8
HOPE IT HELPS
MARK ME AS BRAINLIEST.
Answered by
31
Give the output
float x=-7.87;
system.out.println(math.ceil(x));
system.out.println(math.floor(x));
◕ Math.ceil(x)
= math.ceil(-7.87)
= -7.0
◕ Math.floor(x)
= math.floor(-7.87)
= -8.0
-7.0
-8.0
_______________________________
Note:-
- Math.ceil() is used to return the higher integer for the given argument.
- Math.floor() is used to return the lower integer for the given argument.
________________________________
Similar questions