[Code C/C++] Loading Status Bar
1. This is a program for loading bar.
2. Download Source Code: Here
This is a program for loading bar."; |
2. Download Source Code: Here
3. Code:
#include <conio.h>
#include <iostream>
using namespace std;
/*
StudyCoding.net
Loading Bar
*/
void main()
{
float i, p = 0, m, s = 0, a;
for (int j = 0; j<60; ++j, ++p)
{
system("cls");
cout << endl << endl << " Loading bar: www.StudyCoding.net";
for (i = 0; i<20; ++i)
cout << endl;
cout << endl << " ";
for (i = 0; i<60; ++i)
cout << "-";
cout << endl << " |";
char ch = 177;
for (i = 0; i<p + 1; ++i)
cout << ch;
for (int k = 60; k>p + 1; --k)
cout << " ";
cout << "|";
cout << endl << " ";
for (i = 0; i<60; ++i)
cout << "-";
for (m = 0; m<50000; ++m)
{
s = m + s;
for (a = 0; a<2000; ++a)
{
s = s + a;
}
}
}
_getch();
}
Post a Comment