#include <stdio.h> int main() { int t; scanf("%d",&t); while(t--) { int a,b; char op; scanf("%d%c%d",&a,&op,&b); if(op=='+') printf("%d\n",a+b); else if(op=='-') printf("%d\n",a-b); else printf("ERROR\n"); } } |
Double click to view unformatted code.