- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int speed=100;
- for(int i=1; i<=100; i++){
- cout<<" "<<i<<"% 載入中 ";
- for(int j=1; j<=i%6; j++){
- if(j==1)
- cout<<".";
- if(j==2)
- cout<<".";
- if(j==3)
- cout<<".";
- if(j==4)
- cout<<".";
- if(j==5)
- cout<<".";
- _sleep(speed);
- }
-
- system("cls");
- }
- cout<<" 100% 完成!"<<endl;
- system("pause");
- return 0;
- }
複製代碼 |