I'm trying to create a loop in which when the float var 'a' does not equal an integer, it will repeat. This is a small section of a calculator and I'm just trying to make it fool proof so you can enter only a number and leave everything out.
Whenever I build and run the code, when it reaches the loop, it repeats itself over and over again without asking for any user input.
1 2 3 4 5 6 7 8 9 10 11 12
float a, b, x;
string y;
cout << "Calculator 2016" << endl;
cout << "Insert a Number:" << endl;
cin >> a;
while (!(a / a == 1)){
cin >> a;
system("CLS");
cout << "That is not a valid number \n" << "Insert a Number:\n";
}