返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. void welcome()
  5. {
  6.     cout<<"歡迎光臨"<<endl;
  7. }
  8. int main()
  9. {
  10.     int x;
  11.     cout<<"請輸入次數:";
  12.     cin>>x;
  13.     for(int i=x; i>0; i--)
  14.         welcome();
  15.     system("pause");
  16.     return 0;   
  17. }
複製代碼

TOP

返回列表