返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.   re:
  7.   for(int i=1; i<=160; i++)           
  8.   {
  9.     if(i>=1 &&i<=20)
  10.     cout<<"歡";
  11.     if(i>=21 &&i<=40)
  12.     cout<<"  迎";
  13.     if(i>=41 &&i<=60)
  14.     cout<<"    光";
  15.     if(i>=61 &&i<=80)
  16.     cout<<"      臨";
  17.     if(i>=81 &&i<=100)
  18.     cout<<"歡";
  19.     if(i>=101 &&i<=120)
  20.     cout<<"歡迎";
  21.     if(i>=121 &&i<=140)
  22.     cout<<"歡迎光";
  23.     if(i>=141 &&i<=160)
  24.     cout<<"歡迎光臨";
  25.     system("cls");
  26.    }
  27.    goto re;
  28.    system("pause");
  29.    return 0;
  30. }
複製代碼

TOP

返回列表