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

TOP

返回列表