标签:math ble double size fixed ret stream include out
#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
int main()
{
int a,b,c;
double s,p;
cin>>a>>b>>c;
p=(a+b+c)/2.0;
s=sqrt(p*(p-a)*(p-b)*(p-c));
cout<<setiosflags(ios::fixed)<<setprecision(2);
cout<<s<<endl;
return 0;
}
要注意是2.0不是2
标签:math ble double size fixed ret stream include out
原文地址:http://www.cnblogs.com/addyq/p/7243704.html