1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
#include <iostream>
#include <windows.h>
using namespace std;
int main () {
const WORD colors[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F };
HANDLE hOut;
hOut = GetStdHandle (STD_OUTPUT_HANDLE);
while (1) {
for (short int x=0;x=14;x++) {
SetConsoleTextAttribute (hOut, colors[x]);
cout << "\t\t\t\t " << x + 1<< " \t\t\t\t " << endl;
Sleep (1000);
}
}
return 0;
}
|