#include <iostream>
#include <cmath>
using namespace std;
int main ()
{
double a,b,c,t,s;
cout<<"input 3 numbers"<<endl;
cin>>a,b,c;
if ((a+b)>c && (a+c)>b && (b+c)>a)
{
t=(a+b+c)/2;
s=sqrt(t*(t-a)*(t-b)*(t-c));
cout<<"S="<<s<<endl;
}
else cout<<"No triangle!"<<endl;
return 0;
}
输入数字运算时总不对