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

TOP

返回列表