This math function rounds a number up or down to the nearest whole number c++ code example
Example: nearest integer rounding in c++
cout << "Nearest value of x :" << round(x) << "\n";
cout << "Nearest value of x :" << round(x) << "\n";