返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     re:
  7.     int n=0;
  8.     for(int i=1;i<=40;i++)
  9.     {
  10.             if(i<=20)
  11.             n++;
  12.             else
  13.             n--;
  14.             
  15.             for(int j=0;j<=n;j++)
  16.             {
  17.                     cout<<" ";
  18.             }
  19.             cout<<"歡迎光臨"<<endl;
  20.             _sleep(100);
  21.             system("cls");
  22.     }
  23.     goto re;
  24.     system("pause");
  25.     return 0;
  26. }
複製代碼

TOP

返回列表