1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
#include <Windows.h>
#include <iostream>
#include <string>
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
signed int holdUp();
#ifdef max
#undef max
#endif
class Hypnosis {
private:
int white;
int yellow;
int lightBlue;
int green;
int purple;
int red;
int blue;
int black;
public:
void beep() {
Beep(2500, 5000); //I know how to extend longer sound.
Sleep(200);
}
Hypnosis(int a=255, int b=239, int c=187, int d=170, int e=221, int f=204, int g=153, int h=0) {
white=a;
yellow=b;
lightBlue=c;
green=d;
purple=e;
red=f;
blue=g;
black=h;
}
void colors() {
std::string width = (" "); //10 blank spaces
for (int color(white); color==white; color++) {
SetConsoleTextAttribute(h, color);
std::cout<<(width);
for (int color(yellow); color==yellow; color++) {
SetConsoleTextAttribute(h, color);
std::cout<<(width);
for (int color(lightBlue); color==lightBlue; color++) {
SetConsoleTextAttribute(h, color);
std::cout<<(width);
for (int color(green); color==green; color++) {
SetConsoleTextAttribute(h, color);
std::cout<<(width);
for (int color(purple); color==purple; color++) {
SetConsoleTextAttribute(h, color);
std::cout<<(width);
for (int color(red); color==red; color++) {
SetConsoleTextAttribute(h, color);
std::cout<<(width);
for (int color(blue); color==blue; color++) {
SetConsoleTextAttribute(h, color);
std::cout<<(width);
for (int color(black); color==black; color++) {
SetConsoleTextAttribute(h, color);
std::cout<<(width);
}
}
}
}
}
}
}
}
}
};
int main() {
Hypnosis turnOn;
turnOn.beep();
for (float extendLength(112.05); extendLength<=0xFF; extendLength++) {
//turnOn.beep();
turnOn.colors();
}
holdUp();return 0;
}
signed int holdUp() {
std::cin.sync(),
std::cin.ignore(std::numeric_limits<std::streamsize>::max());
return(0);
}
|