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

TOP

返回列表