网上一大堆吧
#include <stdio.h>
#include <math.h>
int main()
{
int a,b,c;
float p,s;
scanf("%d%d%d",&a,&b,&c);
if(a+b<=c || a+c<=b||b+c<=a)
return 0;
p = (a+b+c)/2.0;
s = sqrt((p-a)*(p-b)*(p-c));
printf("%f",s);
}
为您找到符合的博客https://www.cnblogs.com/HGNET/p/11751570.html
有详解