View Code of Problem 24

#include<stdio.h>
#define N 100
#include<math.h>
int main()
{
	int a,b,c;
	float S,t;
	while(scanf("%d%d%d",&a,&b,&c) != EOF)
	{
		t =(float)(a + b + c) / 2;
		S = sqrt(t * (t - a) * (t - b)* (t - c));
		printf("%.2f\n",S);
	}
	
}

Double click to view unformatted code.


Back to problem 24