how to cast an integertoa double in c++ code example Example: c++ convert int to double int a{5},b{2},c{9}; double d = (double)a / (double)b + (double)c;