Explain math round. () with an example
Answers
Answered by
2
Answer:
round() is a built-in math function which returns the closest long to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result after adding 1/2, and casting the result to type long. If the argument is NaN, the result is 0.
Answered by
1
Answer:
The Math. round() method in Java is used to round a number to its closest integer. This is done by adding 1 / 2 1/2 1/2 to the number, taking the floor of the result, and casting the result to an integer data type.
Explanation:
HI MATE
HOPE IT HELPS
MARK ME AS BRAINLIST
Similar questions