#include <iostream>
using namespace std;
int main()
{
int a, b, c;
float s, t;
cin >> a >> b >> c;
t = (a + b + c) / 2;
s = sqrt(t*(t - a)*(t - b)*(t - c));
cout << s << endl;
}
已知三角形三条边求面积
于 2023-11-20 20:46:18 首次发布
#include <iostream>
using namespace std;
int main()
{
int a, b, c;
float s, t;
cin >> a >> b >> c;
t = (a + b + c) / 2;
s = sqrt(t*(t - a)*(t - b)*(t - c));
cout << s << endl;
}