剛學SO~問的題目可能會比較淺
希望有大大可以指導我~萬般感謝~!
(我的C++程式為 :Microsoft Visual Studio 6.0)
-----------------------------
#include <iostream.h>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
cout << "請輸入三角形三邊長" << a << "cm" << b << "cm" << c << "cm" << endl;
float s;
cin >> a >> b >> c;
s = ( 1 / 2) * (a + b + c);
float A;
A = (s * (s - a) * (s - b) * (s - c) );
float L;
L = pow(A , 0.5);
cout << "三角形面積為" << L << "平方單位" << endl;
cout << endl << endl << endl;
return 0;
}