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

TOP

返回列表