#include #include using namespace std; int main() { int a = 5; int b = 10; // use this: cout << static_cast(a) / b << endl; // p.24 // older styles: do not use! cout << (double)a << endl; cout << double(a) << endl; return 0; }