That worked for mePHP Code:#include <iostream.h>
int main()
{
int num1;
int num2;
int total;
char oper;
cout << "what is number1\n";
cin >> num1;
cout << "what is number2\n";
cin >> num2;
cout << "what sign shall i use\n in the middle of the two?";
cin >> oper;
cout << "what is the total\n";
cin >> total;
cout << "am i correct in saying that " << num1 <<
oper << num2 << "=" << total << "?";
return 0;
}
Also, whenever you use cin, make sure to use cin.ignore() after that so you dont have any cariage return (\n or \r) on your cin buffer.




Also, whenever you use cin, make sure to use cin.ignore() after that so you dont have any cariage return (\n or \r) on your cin buffer.
:MoMad:
Reply With Quote