View Code of Problem 48

#include <stdio.h>
#include <math.h>
int main()
{
    int a,b,c;
    double s,sum;
    while(~scanf("%d%d%d",&a,&b,&c))
    {
        s = (a+b+c)/2;
        sum = sqrt(s*(s-a)*(s-b)*(s-c));
        printf("%.2lf\n",sum);
    }
}

Double click to view unformatted code.


Back to problem 48