c++ cast double to int code example
Example 1: double to int c++
double x = 5.4;
int y = (int) x;
Example 2: casting to a double in c++
double x;
x = (double) 25;
double x = 5.4;
int y = (int) x;
double x;
x = (double) 25;