- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int speed=500;
- re:
- for(int i=1; i<=15; i++)
- {
- if(i==1)
- cout<<"歡 "<<endl;
- if(i==2)
- cout<<" 迎 "<<endl;
- if(i==3)
- cout<<" 光 "<<endl;
- if(i==4)
- cout<<" 臨"<<endl;
- if(i==5)
- cout<<"歡 "<<endl;
- if(i==6)
- cout<<"歡迎 "<<endl;
- if(i==7)
- cout<<"歡迎光 "<<endl;
- if(i==8)
- cout<<"歡迎光臨"<<endl;
- if(i==9)
- cout<<" "<<endl;
- if(i==10)
- cout<<"歡迎光臨"<<endl;
- if(i==11)
- cout<<" "<<endl;
- if(i==12)
- cout<<"歡迎光臨"<<endl;
- if(i==13)
- cout<<" "<<endl;
- if(i==14)
- cout<<"歡迎光臨"<<endl;
- if(i==15)
- cout<<" "<<endl;
- _sleep(speed);
- system("cls");
- }
- goto re;
- system("pause");
- return 0;
- }
複製代碼 |