标签:har scan default scanf ase amp oid a* turn
#include<stdio.h>
int main(void)
{ int a,b,c;
char flag;
scanf("%d %c %d",&a,&flag,&b);
switch(flag)
{ case ‘+‘:c = a + b;break;
case ‘-‘:c = a - b;
break;
case ‘*‘:c = a* b;
break;
case ‘/‘:c = a / b;
break;//此处为取整没用除法
default:break; }
printf("计算结果:%d\n",c); return 0; }
标签:har scan default scanf ase amp oid a* turn
原文地址:https://www.cnblogs.com/xiaowei02/p/10897823.html