double x = 0.0; cout << "Enter a value"; cin >> x; x = x * 5; cout << x << endl;
If I input anything other than a numeric value my program doesn't work. I am new to C++ and thought this would be a very simple problem to solve but I have tried to find a solution but couldn't understand most of them.
Thanks for your help.
This post has been edited by Johnny64: 18 June 2011 - 05:29 AM