返回列表 發帖
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int x,y,z;
  6.     cout<<"請輸入梯形的上底(公分): ";
  7.     cin>>x;
  8.     cout<<"請輸入梯形的下底(公分): ";
  9.     cin>>y;
  10.     cout<<"請輸入梯形的高(公分): ";
  11.     cin>>z;
  12.     cout<<"本梯形的面積為"<<(x+y)*z/2<<"平方公分"<<endl;
  13.     system("pause");
  14.     return 0;
  15. }
複製代碼

TOP

返回列表