#include <iostream>
#include <cmath>
using namespace std;
int main()
{
double a, b, c, s, area, check;
cout << "輸入三角形ABC的邊長 a = ";
cin >> a;
cout << "輸入三角形ABC的邊長 b = ";
cin >> b;
cout << "輸入三角形ABC的邊長 c = ";
cin >> c;
s = (a + b + c) / 2;
check = s* (s-a)* (s-b)* (s-c);
if (check < 0)
cout << "輸入的三邊長無法組成三角形! \n";
else
{
area = sqrt(check);
cout << "三角形ABC的面積 = " << check << endl;
}
system("pause");
return 0;
}