2018/3/21
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
int n;
cin >> n;
char op;
int a, b;
while(n--){
cin >> op >> a >> b;
if(op == '+'){
cout << a+b << endl;
}else if(op == '-'){
cout << a-b << endl;
}else if(op == '*'){
cout << a*b << endl;
}else if(op == '/'){
if(a % b)
printf("%.2f\n", a*1.0/b);
else
cout << a/b << endl;
}
}
return 0;
}