#include<cstdio> //Dev C++可调用<iostream>和<stdio.h>库
#include<math.h> //在Dev C++中可调用数学函数库cmath
int main()
{ float a,b,c,p,s;
scanf("%f%f%f",&a,&b,&c); //输入三角形的三边
p=(a+b+c)/2; //求出p的值
s=sqrt(p*(p-a)*(p-b)*(p-c)); //根据p求面面积,sqrt是开方函数
printf("%0.4f\n",s); //输出面积,0.3f按实际位数输出,保留3位小数
}
03-07
1084
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)