View Code of Problem 24

#include<iostream>
#include<math.h>
//#include <iomanip>
using namespace std;

int main()
{
    double a,b,c,s;
    while(cin>>a>>b>>c)
    {
        s=(a+b+c)/2;
        double res;
        res=sqrt(s*(s-a)*(s-b)*(s-c));
        printf("%.2lf\n",res);
    }


    return 0;
}

Double click to view unformatted code.


Back to problem 24