#include <iostream>
#include <limits>
using namespace std;
void calc()
{
char Oper;
int num1, num2;
cout << "Enter operator and two numbers: ";
cin >> Oper >> num1 >> num2;
if (cin.fail()){
cout << "Bad input\n";
cin.clear();
cin.ignore(numeric_limits<streamsize>::max(), '\n');
return;
}
if (Oper == '+')
cout << num1 + num2 << endl;
else if (Oper == '/')
cout << num1 / num2 << endl;
else if (Oper == '*')
cout << num1 * num2 << endl;
else if (Oper == '-')
cout << num1 - num2 << endl;
calc();
}
int main()
{
while (true)
{
calc();
}
}