#include <iostream>
#include<cmath> //用到数学函数时要用cmath
#include<iomanip> //使用io流控制字符要用iomanip
using namespace std;
int main() {
double a, b, c, s, m;
cout << "请输入边长:";
cin >> a >> b >> c;
if (a + b > c && a + c > b && b + c > a) //判断是否为三角形
{
s = (a + b + c) / 2;
m = sqrt(s * (s - a) * (s - b) * (s - c)); //sqrt 平方根
cout << setiosflags(ios::fixed) << setprecision(3); //精确到三位小数
cout << "面积为:" << m << endl;
} else
cout << "错误" << endl;
return 0;
}