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

TOP

返回列表