View Code of Problem 24

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

Double click to view unformatted code.


Back to problem 24