- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- re:
- for(int i=1; i<=160; i++)
- {
- if(i>=1 &&i<=20)
- cout<<"歡";
- if(i>=21 &&i<=40)
- cout<<" 迎";
- if(i>=41 &&i<=60)
- cout<<" 光";
- if(i>=61 &&i<=80)
- cout<<" 臨";
- if(i>=81 &&i<=100)
- cout<<"歡";
- if(i>=101 &&i<=120)
- cout<<"歡迎";
- if(i>=121 &&i<=140)
- cout<<"歡迎光";
- if(i>=141 &&i<=160)
- cout<<"歡迎光臨";
- system("cls");
- }
- goto re;
- system("pause");
- return 0;
- }
複製代碼 |