#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;cin>>t;
while(t--)
{
char s;
double a,b;
cin>>s>>a>>b;
double res=0;
if(s=='+')
res=a+b;
else if(s=='-')
res=a-b;
else if(s=='*')
res=a*b;
else if(s=='/')
res=a/b;
int temp=res;
if(abs(res-temp)<0.0000001)
printf("%d\n",(int)res);
else printf("%.2lf\n",res);
}
return 0;
}
HDU 1170 Balloon Comes!
最新推荐文章于 2021-03-07 14:31:52 发布