- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- int main()
- {
- int speed=1000;
- for(int i=1; i<=5; i++)
- {
- if(i==1)
- cout<<"5!"<<endl;
- if(i==2)
- cout<<"4!"<<endl;
- if(i==3)
- cout<<"3!"<<endl;
- if(i==4)
- cout<<"2!"<<endl;
- if(i==5)
- cout<<"1!"<<endl;
- _sleep(speed);
- system("cls");
- }
- for(int x=1; x<=time(NULL);x++)
- {
- cout<<"***Happy new year***"<<endl;
- _sleep(speed);
- system("cls");
- cout<<"***Happy new year***"<<endl;
- _sleep(speed);
- system("cls");
-
- }
- system("pause");
- return 0;
- }
複製代碼 |