View Code of Problem 24

#include<stdio.h>
#include<string.h>
#include<math.h>
int main()//三角形面积 
{ 
	float a,b,c,area,t;
	scanf("%f%f%f",&a,&b,&c);
	t = (a + b + c) / 2;
	area =  sqrt(t * (t - a) * (t - b)*(t - c)) ;
	printf("%.2f",area);
	
}

Double click to view unformatted code.


Back to problem 24