1 #include2 3 char s[300]; 4 5 int main() 6 { 7 int n,a,b; 8 char c; 9 double ans;10 scanf("%d",&n);11 getchar();12 while(n--)13 {14 scanf("%c%d%d",&c,&a,&b);15 getchar();16 switch (c)17 {18 case '+':printf("%d\n",a+b);break;19 case '-':printf("%d\n",a-b);break;20 case '*':printf("%d\n",a*b);break;21 case '/':a%b?printf("%.2lf\n",(double)a/b):printf("%d\n",a/b);break;22 }23 }24 }