#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;

int main()
{
    double a, b, c;
    double s;
    while (scanf("%lf %lf %lf",&a,&b,&c)!=EOF)
    {
        double p = (a + b + c) / 2;
        s = sqrt(p*(p - a)*(p - b)*(p - c));
        cout << setiosflags(ios::fixed) << setprecision(3) << s << endl;
    }
    return 0;
}

海伦公式:s=sqrt(p(p-a)(p-b)(p-c))

posted on 2017-07-09 20:53  HANCAO  阅读(117)  评论(0编辑  收藏  举报