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

TOP

返回列表