#include <iostream>
#include <iomanip>
#include <cmath>
#include <stdio.h>
using namespace std;
int main()
{
int n;
cin>>n;
while(n--)
{
char c;
int a,b;
cin>>c>>a>>b;
if(c=='+')
cout << a+b<< endl;
else if(c=='-')
cout << a-b<< endl;
else if(c=='*')
cout << a*b<< endl;
else if(c=='/' ){
if(a%b!=0)
cout <<fixed<<setprecision(2)<<a/(b*1.0)<< endl;
else
cout <<a/b<< endl;}
}
return 0;
}
杭电OJ1170
最新推荐文章于 2024-03-24 11:15:10 发布