C++ Math lrint()
The function rounds off the given value using current rounding mode and returns the value of type long int.
Suppose a number is 'x'. Syntax would be:
x: The value that can be float, double or long double.
It returns the rounded value of x and the return type of the value is long int.
Let's see a simple example.
Enter the value which you want to round : 7.8 Name of the methods are : 1. Rounding downwards 2. Rounding upwards 3. Rounding towards zero 4. Rounding to the nearest Enter the number of rounding method : 1 Rounding downwards,value is :7