返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {      
  6.        re:
  7.      for(int i=1; i<=100; i++)
  8.     {
  9.      if(i>=1 && i<=25)
  10.      cout<<"歡"<<endl;
  11.      if(i>=26 && i<=50)
  12.      cout<<"  迎"<<endl;
  13.      if(i>=51 && i<=75)
  14.      cout<<"    光"<<endl;
  15.      if(i>=76 && i<=100)
  16.      cout<<"      臨"<<endl;
  17.      system("cls");        
  18.     }
  19.     for(int e=1; e<=150; e++)
  20.     {
  21.      if(e>=1 && e<=25)
  22.      cout<<"歡"<<endl;
  23.      if(e>=26 && e<=50)
  24.      cout<<"歡迎"<<endl;
  25.      if(e>=51 && e<=75)
  26.      cout<<"歡迎光"<<endl;
  27.      if(e>=76 && e<=150)
  28.      cout<<"歡迎光臨"<<endl;
  29.      system("cls");  
  30.      }
  31.      goto re;
  32.     system("pause");
  33.     return 0;
  34. }   
複製代碼

TOP

返回列表