int helen(double a,double b,double c)//海伦公式求面积
{
if(a+b>c && b+c>a && a+c>b)
{
double p=(a+b+c)/2;
return trunc(sqrt(p*(p-a)*(p-b)*(p-c))*100);
}
else return -1;
}
原文:https://www.cnblogs.com/sjsjsj-minus-Si/p/11635613.html