#include
int main()
{int a,b,c;
char op;
scanf("%d%c%d",&a,&op,&b);
while(op!='+'&&op!='-'&&op!='*'&&op!='/')
{printf("只能计算加减乘除,请重新输入:\n");
scanf("%d%c%d",&a,&op,&b);
}
if(op=='/'&&b==0)
{printf("divided by zero.\n");
return (1);
}
switch(op)
{case '+':c=a+b;break;
case '-':c=a-b;break;
case '*':c=a*b;break;
case '/':c=a/b;break;
}
printf("%d%c%d=%d\n",a,op,b,c);
return 0;
}