已知三角形的三条边,求三角形的面积
作者:互联网
#include<stdio.h>
#include<math.h>
int main(){
double a,b,c,s,area;
a=3.67;
b=5.34;
c=6.21;
s=(a+b+c)/2.0;
area=sqrt(s*(s-a)*(s-b)*(s-c));
printf("a=%f\tb=%f\tc=%f\n",a,b,c);
printf("area=%f\n",area);
return 0;
}
标签:main,return,area,已知,printf,三条,三角形,include 来源: https://blog.csdn.net/weixin_43370629/article/details/88746740