#include<iostream>
#include<cmath>
using namespace std;
int main() {
double a, b, c, p, s;
cout << "输入三角形的三个边长";
cin >> a >> b >> c;
p = (a + b + c)/2;
s=sqrt(p * (p - a) * (p - b) * (p - c));
cout << "三角形的面积为";
cout << s;
return 0;
}
#include<iostream>
#include<cmath>
using namespace std;
int main() {
double a, b, c, p, s;
cout << "输入三角形的三个边长";
cin >> a >> b >> c;
p = (a + b + c)/2;
s=sqrt(p * (p - a) * (p - b) * (p - c));
cout << "三角形的面积为";
cout << s;
return 0;
}