using namespace std;
Int main ()
{
Int a, b, d=0;
char c;
Cin> A> b> c;
The switch (c) {
A case of '+' : d=a + b; break;
Case '-' : d=a - b; break;
Case '*' : d=a * b; break;
Case: '/' d=a/b; break;
}
Cout
}
CodePudding user response:
Take title to the requirement of output format into consideration, also just about, such as case '/' d=a/b after check before b is zero, add a default after the case statement