Computer Science, asked by alfishahussain9, 1 month ago

differentiate between math .ceil ( ) and math. round ()​

Answers

Answered by atrs7391
0

Answer:

Math.ceil() and Math.round() methods differ in a way that the former round off a number to its nearest integer in upward direction of rounding(towards the greater value) whereas the latter round off a number to its nearest integer in downward direction of rounding(towards lower value).

Math.ceil(2.6)=3

Math.round(2.6)=3

Math.ceil(2.4)=3

Math.round(2.4)=2

Similar questions