返回列表 發帖
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. using namespace std;

  5. int main()
  6. {      
  7.         int speed=1000;
  8.         for(int i=1; i<=5; i++)
  9. {
  10.    if(i==1)
  11.     cout<<"5!"<<endl;
  12.     if(i==2)
  13.     cout<<"4!"<<endl;
  14.     if(i==3)
  15.     cout<<"3!"<<endl;
  16.     if(i==4)
  17.     cout<<"2!"<<endl;
  18.     if(i==5)
  19.     cout<<"1!"<<endl;
  20.     _sleep(speed);
  21.     system("cls");
  22. }
  23.    for(int x=1; x<=time(NULL);x++)
  24. {
  25.         cout<<"***Happy new year***"<<endl;
  26.         _sleep(speed);
  27.         system("cls");
  28.         cout<<"***Happy new year***"<<endl;
  29.         _sleep(speed);
  30.         system("cls");
  31.        

  32. }
  33.         system("pause");
  34.    return 0;
  35. }
複製代碼

TOP

返回列表