C++ Math rint()The function rounds off the given value to the nearest integer using current rounding mode. The current rounding mode is determined by fesetround(). For example: SyntaxSuppose a number 'x'. Syntax would be: Note: The return_type can be float, double or long double.Parameterx: The value that can be either float or double. Return valueIt returns the rounded value of x. Example 1Let's see a simple example. Output: Value of x is :9.9 Rounding to nearest,value is :10 Rounding to upward,value is :10 Rounding to downward,value is :9
Next TopicC++ Math Functions
|
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week