- #include<iostream>
- #include<cstdlib>
- #include<time.h>
- using namespace std;
- int main()
- {
- cout<<"☆★☆跑馬燈☆★☆"<<endl;
- for(int i=0;i<=100;i++)
- {
- cout<<i<<"%";
-
- if(i<=0)
- cout<<"□□□□□□□□□□"<<endl;
- if(i<=10 && i>10)
- cout<<"■□□□□□□□□□"<<endl;
- if(i<=10 && i>20)
- cout<<"■■□□□□□□□□"<<endl;
- if(i<=10 && i>30)
- cout<<"■■■□□□□□□□"<<endl;
- if(i<=10 && i>40)
- cout<<"■■■■□□□□□□"<<endl;
- if(i<=10 && i>50)
- cout<<"■■■■■□□□□□"<<endl;
- if(i<=10 && i>60)
- cout<<"■■■■■■□□□□"<<endl;
- if(i<=10 && i>60)
- cout<<"■■■■■■■□□□"<<endl;
- if(i<=10 && i>70)
- cout<<"■■■■■■■■□□"<<endl;
- if(i<=10 && i>80)
- cout<<"■■■■■■■■■□"<<endl;
- if(i<=10 && i>99)
- cout<<"■■■■■■■■■■"<<endl;
- _sleep(120);
- system("cls");
- }
- system("pause");
- return 0;
- }
複製代碼 |