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<<a/b<<endl;
else {s=(double)a/(double)b;cout<<setiosflags(ios::fixed);
cout.precision(2); cout<<s<<endl;}
题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2039
此题的关键是知道三角形的判定方法
a+c>b&&a+b>c&&b+c>a
其他的就没什么了,还有注意读题,没要说一定是整数