分支结构的五则运算
#include <stdio.h>
int main() {
int first;
int second;
char operator;
scanf("%d%c%d", &first, &operator, &second);
switch(operator)
{
case'+':printf("=%d",first + second);break;
case'-':printf("=%d",first - second);break;
case'*':printf("=%d",first * second);break;
case'/':printf("=%d",first / second);break;
case'%':printf("=%d",first % second);break;
default:printf("请重新输入");
}
return 0;
}