Computer Applications

The AMB hotel gives the amount to be paid by the customer as an integer, which of the following Math method rounds off the bill in decimals to an integer?

  1. Math.round()
  2. Math.pow()
  3. Math.ceil()
  4. Math.abs()

Java Math Lib Methods

1 Like

Answer

Math.round()

Reason — The Math.round() method rounds a decimal number to the nearest integer. It returns the closest whole number, which is suitable for rounding off a bill amount to an integer.

Answered By

2 Likes


Related Questions