返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     float x;
  7.     float y;
  8.     cout << "請輸入三角形的高:" << endl;
  9.     cin >> x;
  10.     cout << "請輸入三角形的底:" << endl;
  11.     cin >> y;
  12.     cout << x << "和" << y << "算出來得面積是:" << x * y / 2 << endl;
  13.     system("pause");
  14.     return 0;
  15. }
複製代碼

TOP

返回列表