- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- re:
- for(int i=-10;i<=120;i++)
- {
- if(i<-5)
- cout<<"歡迎光臨";
- else if(i<0)
- cout<<" ";
- else if(i<5)
- cout<<"歡迎光臨";
- else if(i<10)
- cout<<" ";
- else if(i<20)
- cout<<"歡";
- else if(i<30)
- cout<<" 迎";
- else if(i<40)
- cout<<" 光";
- else if(i<50)
- cout<<" 臨";
- else if(i<60)
- cout<<"歡";
- else if(i<70)
- cout<<"歡迎";
- else if(i<80)
- cout<<"歡迎光";
- else if(i<90)
- cout<<"歡迎光臨";
- else if(i<100)
- cout<<"歡迎光";
- else if(i<110)
- cout<<"歡迎";
- else
- cout<<"歡";
-
- _sleep(20);
- system("cls");
- }
- goto re;
- system("pause");
- return 0;
- }
複製代碼 |