#include <cstdio> #include <iostream> using namespace std; int main() { int n; scanf("%d",&n); for(int i=1; i<=n; i++) { char c,demo; int a,b; scanf("%c%c%c%d%c%d",&demo,&c,&demo,&a,&demo,&b); if (c=='+') printf("%d ",a+b); if (c=='-') printf("%d ",a-b); if (c=='*') printf("%d ",a*b); if (c=='/') { (a%b==0)?printf("%d ",a/b):printf("%0.2f ",(float)a/(float)b); } } //system("pause"); return 0; }