- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- re:
- for(int i=1; i<=100; i++)
- {
- if(i>=1 && i<=25)
- cout<<"歡"<<endl;
- if(i>=26 && i<=50)
- cout<<" 迎"<<endl;
- if(i>=51 && i<=75)
- cout<<" 光"<<endl;
- if(i>=76 && i<=100)
- cout<<" 臨"<<endl;
- system("cls");
- }
- for(int e=1; e<=150; e++)
- {
- if(e>=1 && e<=25)
- cout<<"歡"<<endl;
- if(e>=26 && e<=50)
- cout<<"歡迎"<<endl;
- if(e>=51 && e<=75)
- cout<<"歡迎光"<<endl;
- if(e>=76 && e<=150)
- cout<<"歡迎光臨"<<endl;
- system("cls");
- }
- goto re;
- system("pause");
- return 0;
- }
複製代碼 |