round funciton in c++ code example
Example 1: nearest integer rounding in c++
cout << "Nearest value of x :" << round(x) << "\n";
Example 2: rounding off to nearest integer in c++
double round(double x);
float round(float x);
long double round(long double x);
double round(T x); // For integral type