#include <iostream>
#include <string>
usingnamespace std;
int main()
{
string userselection = "no";
while (userselection == "yes")
{
cout << "Enter two numbers: " << endl;
int num1 = 0;
int num2 = 0;
cin >> num1;
cin >> num2;
cout << num1 << " X " << num2 << " = " << num1 * num2 << endl;
cout << "Press 'yes' to redo operation, any other to exit! " << endl;
cin >> userselection;
}
cout << "Goodybe" << endl;
return 0;
}
When I execute this, it doesn't even execute the codes inside the second braces. When I add a semicolon after the while statement, the braces execute, however the loop won't happen. Help me out here?