#include<stdio.h>
int main(void) {?? ?char c; ?? ?int data1,data2; ?? ?double d;
?? ?scanf("%d %d",&data1,&data2); ?? ?getchar(); ?? ?c=getchar(); ?? ??? ?switch(c) ?? ??? ?{ ?? ??? ?case'+':d=data1+data2;printf("%.0lf",d);break;
?? ??? ?case'-':d=data1-data2;printf("%.0lf",d);break; ?? ??? ?case'*':d=data1*data2;printf("%.0lf",d);break; ?? ??? ?case'/':d=data1*1.0/data2;{?? ?if(c='/'&&data1%data2!=0) ?? ??? ??? ??? ?{printf("%.2lf",d);} ?? ??? ??? ??? ?else ?? ??? ??? ??? ?printf("%.0lf",d);};break; ?? ??? ?} ?? ? ?? ??? ? ?? ??? ??? ? ?? ?return 0; }
|