English

Distinguish between Math.rint( ) and Math.round( ). - Computer Applications

Advertisements
Advertisements

Question

Distinguish between Math.rint( ) and Math.round( ).

Distinguish Between

Solution

S. No. Math.rint() Math.round()
1. Math.rint() returns a shortened version of a number. Math.round() returns the rounded result, up to the closest integer.
2. The return type of Math.rint() is double. Math.round() returns either int or long.
shaalaa.com
  Is there an error in this question or solution?
Chapter 1.07: Mathematical Library Methods - EXERCISES [Page 81]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.07 Mathematical Library Methods
EXERCISES | Q V. 2. | Page 81
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×