- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int speed=120;
-
- for(int i=0; i<100; i++)
- {
- if(i<10)
- cout<<" "<<i<<"% 載入中 ";
- else
- cout<<" "<<i<<"% 載入中 ";
- if(i%8==0)
- cout<<endl;
-
- else if(i%8==1)
- cout<<"l"<<endl;
-
- else if(i%8==2)
- cout<<"lo"<<endl;
-
- else if(i%8==3)
- cout<<"loa"<<endl;
-
- else if(i%8==4)
- cout<<"load"<<endl;
-
- else if(i%8==5)
- cout<<"loadi"<<endl;
-
- else if(i%8==6)
- cout<<"loadin"<<endl;
-
- else
- cout<<"loading"<<endl;
-
-
-
-
- _sleep(speed);
- system("cls");
- }
- cout<<"100% 完成! "<<endl;
- system("pause");
- return 0;
- }
複製代碼 |