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