三角形面积

  无难度,海伦公式....

#include<stdio.h>
#include<math.h>

int main()
{
	double a,b,c,p,Area;

	while(scanf("%lf%lf%lf",&a,&b,&c)!=EOF)
	{
		Area=0;

		p=(a+b+c)/2;

		Area=sqrt(p*(p-a)*(p-b)*(p-c));
		
		printf("%.3lf\n",Area);
	}
	return 0;
}

  

原文地址:https://www.cnblogs.com/deosky/p/2349305.html