返回列表 發帖
本帖最後由 張峻瑋 於 2014-3-29 16:44 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     for(int i=1;i<=500;i++)
  7.     {
  8.         if(i>=1 && i<=50)
  9.             cout<<"  "<<i/5<<"% 載入中 ▋";
  10.         if(i>=51 && i<=100)
  11.             cout<<" "<<i/5<<"% 載入中 ▋▋"<<endl;
  12.         if(i>=101 && i<=150)
  13.             cout<<" "<<i/5<<"% 載入中 ▋▋▋"<<endl;
  14.         if(i>=151 && i<=200)
  15.             cout<<" "<<i/5<<"% 載入中 ▋▋▋▋"<<endl;
  16.         if(i>=201 && i<=250)
  17.             cout<<" "<<i/5<<"% 載入中 ▋▋▋▋▋"<<endl;
  18.         if(i>=251 && i<=300)
  19.             cout<<" "<<i/5<<"% 載入中 ▋▋▋▋▋▋"<<endl;
  20.         if(i>=301 && i<=350)
  21.             cout<<" "<<i/5<<"% 載入中 ▋▋▋▋▋▋▋"<<endl;
  22.         if(i>=351 && i<=400)
  23.             cout<<" "<<i/5<<"% 載入中 ▋▋▋▋▋▋▋▋"<<endl;
  24.         if(i>=401 && i<=450)
  25.             cout<<" "<<i/5<<"% 載入中 ▋▋▋▋▋▋▋▋▋"<<endl;   
  26.         if(i>=451 && i<=500)
  27.             cout<<" "<<i/5<<"% 載入中 ▋▋▋▋▋▋▋▋▋▋"<<endl;            
  28.         system("cls");
  29.     }
  30.         cout<<"100% 完成!"<<endl;               
  31.     system("pause");
  32.     return 0;
  33. }
複製代碼

TOP

返回列表