double to nearest int c++ code example
Example 1: double to int c++
double x = 5.4;
int y = (int) x;
Example 2: c++ round function
double round(double x);
float round(float x);
long double round(long double x);
double round(T x); // For integral type