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

TOP

返回列表