返回列表 發帖
本帖最後由 李偈睿 於 2024-6-8 16:10 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int x,y;
  7.     cout<<"請輸入方方型的長"<<endl;
  8.     cin>>x;
  9.     cout<<"請輸入方方型的寬"<<endl;
  10.     cin>>y;
  11.     cout<<"長"<<x<<"公分,寬"<<y<<"公分的長方形,周長是"<<x*2+y*2<<"公分,面積是"<<x*y<<"平方公分"<"endl;
  12.                                                                  
  13.         }
  14.         cout<<endl;
  15.         goto re;                               
  16.         system("pause");
  17.         return 0;                                            
  18. }
複製代碼

TOP

返回列表