Computer Science, asked by Jason999, 6 months ago

What does the math.ceil and math.floor method do in Java?

Answers

Answered by ankitadas1729
1

Hey dude !

In Java, math ceil returns the smallest integer that is greater than or equal to the argument.

And,

In Java,math floor returns the largest integer that is less than or equal to the argument.

Hope this will help you

please try to mark it as brainliest. ...

Answered by EthicalElite
31

\tt{✧ \: Math.ceil:-}

  1. Math.ceil() is used to return the higher integer for the given argument.
  2. For example:-

  • Code:- Math.ceil(5.7)
  • Output:- 6

________________________________

\tt{✧ \: Math.floor:-}

  1. Math.floor() is used to return the lower integer for the given argument.
  2. For example:-

  • Code:- Math.floor(5.7)
  • Output:- 5
Similar questions