如何建立一個*毫無用處*的進度條顯示載入進度- 皮這一下很開心
阿新 • • 發佈:2018-11-01
看了下風雲小Q的空間分享, 覺得很有意思
皮這一下很開心
真開心
#include<iostream>
#include<cstdlib>
#include<windows.h>
using namespace std;
/*一個毫無用處的程式*/
void loading(){
cout << "正在載入" << endl;
cout << "載入中" << endl;
cout << "| |" << endl;
Sleep(500);
system("CLS");
cout << "正在載入" << endl;
cout << "載入中" << endl;
cout << "|---> |" << endl;
Sleep(500);
system("CLS");
cout << "正在載入" << endl;
cout << "載入中" << endl;
cout << "|--------> |" << endl;
Sleep(500);
system("CLS");
cout << "正在載入" << endl;
cout << "載入中" << endl;
cout << "|-------------------> |" << endl;
Sleep(500);
system("CLS");
cout << "正在載入" << endl;
cout << "載入中" << endl;
cout << "|----------------------------> |" << endl;
Sleep(500);
system("CLS");
cout << "正在載入" << endl;
cout << "載入中" << endl;
cout << "|---------------------------------------> |" << endl;
Sleep(500);
system("CLS");
cout << "正在載入" << endl;
cout << "載入中" << endl;
cout << "|------------------------------------------------>|" << endl;
Sleep(500);
cout << "載入成功!" << endl;
system("pause");
}
int main()
{
loading();
return 0;
}
Copyright: dolor_059