返回列表 發帖
  1. #include<cstdlib>
  2. #include<ctime>
  3. using namespace std;
  4. int main()
  5. {
  6.     int speed=200;
  7.     srand(time(NULL));
  8.     for(int i=0; i<=10; i++)
  9.     {
  10.     system("cls");
  11.     if(i==0)
  12.         cout<<"  0% 載入中 □□□□□□□□□□"<<endl;
  13.     if(i==1)
  14.         cout<<" 10% 載入中 ■□□□□□□□□□"<<endl;
  15.     if(i==2)
  16.         cout<<" 20% 載入中 ■■□□□□□□□□"<<endl;
  17.     if(i==3)
  18.         cout<<" 30% 載入中 ■■■□□□□□□□"<<endl;
  19.     if(i==4)
  20.         cout<<" 40% 載入中 ■■■■□□□□□□"<<endl;
  21.     if(i==5)
  22.         cout<<" 50% 載入中 ■■■■■□□□□□"<<endl;
  23.     if(i==6)
  24.         cout<<" 60% 載入中 ■■■■■■□□□□"<<endl;
  25.     if(i==7)
  26.         cout<<" 70% 載入中 ■■■■■■■□□□"<<endl;
  27.     if(i==8)
  28.         cout<<" 80% 載入中 ■■■■■■■■□□"<<endl;
  29.     if(i==9)
  30.         cout<<" 90% 載入中 ■■■■■■■■■□"<<endl;
  31.     if(i==10)
  32.         cout<<"100% 載入中 ■■■■■■■■■■"<<endl;
  33.     _sleep(speed);
  34.     }
  35.     system("pause");
  36.     return 0;
  37. }
複製代碼

TOP

返回列表