标签:stream amp flags log pac end lag color double
#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))
标签:stream amp flags log pac end lag color double
原文地址:http://www.cnblogs.com/hansichen/p/7143134.html