c++ round down code example
Example 1: nearest integer rounding in c++
cout << "Nearest value of x :" << round(x) << "\n";
Example 2: floor() in c++
floor(x):This function in C++ returns the smallest possible integer value which is smaller
than or equal to the given argument.
Input : 2.5 ,-2.1 ,2.9
Output : 2 ,-3, 2