- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main(){
- while(true){
- for(int i=1; i<=12; i++)
- {
- if(i==1)
- cout<<"歡";
- if(i==2)
- cout<<" 迎";
- if(i==3)
- cout<<" 光";
- if(i==4)
- cout<<" 臨";
- if(i==5)
- cout<<"歡";
- if(i==6)
- cout<<"歡迎";
- if(i==7)
- cout<<"歡迎光";
- if(i==8)
- cout<<"歡迎光臨";
- if(i==9)
- cout<<"";
- if(i==10)
- cout<<"歡迎光臨";
- if(i==11)
- cout<<"";
- if(i==12)
- cout<<"歡迎光臨";
- _sleep(300); //休眠300毫秒
- system("cls");
- }
- }
- system("pause");
- return 0;
- }
複製代碼 |