#include <stdio.h>
int main(){
char a ;
double b ;
double c;
printf("输入符号");
scanf("%c",&a);
printf("输入第一个数");
scanf("%lf",&b);
printf("输入第二个数");
scanf("%lf",&c);
switch(a){
case '+':
printf("结果为%lf\n",b+c);
break;
case '-':
printf("%d",sizeof(b));
printf("结果为%lf",b-c);
break;
case '*':
printf("结果为%lf",b*c);
break;
case '/':
printf("结果为%lf",b/c);
break;
case '%':
int d;
int f;
d = (int)b;
f = (int)c;
printf("d =%d 占用%d ",d,sizeof(d));
printf("结果为%d",d%f);
break;
default :
printf("结果为无");
break;
}
return 0;
}