-
Notifications
You must be signed in to change notification settings - Fork 23
/
Hello_world(unimaginable).c
74 lines (74 loc) · 1.54 KB
/
Hello_world(unimaginable).c
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
#include<windows.h>
#include<time.h>
#include<graphics.h>
#include<dos.h>
void SetColor(int ForgC)
{
WORD wColor;
HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO csbi;
if(GetConsoleScreenBufferInfo(hStdOut, &csbi))
{
wColor = (csbi.wAttributes & 0xF0) + (ForgC & 0x0F);
SetConsoleTextAttribute(hStdOut, wColor);
}
return;
}
void delay(float number_of_seconds)
{
float milli_seconds = 100 * number_of_seconds;
clock_t start_time = clock();
while (clock() < start_time + milli_seconds);
}
int main ()
{
int a, b=0, c=10,count=0;
char* bits ="TFy!QJu ROo TNn(ROo)SLq SLq ULo+UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^NBELPeHBFHT}TnALVlBLOFAkHFOuFETpHCStHAUFAgcEAelclcn^r^r\\tZvYxXyT|S~Pn SPm SOn TNn ULo0ULo#ULo-WHq!WFs XDt!";
a = bits[b];
delay(20);
SetColor(1);
settextstyle(2,0,2);
outtextxy(100,20*i,"Hello");
SetColor(3);
settextstyle(2,0,2);
outtextxy(100,20*i,"World");
SetColor(5);
settextstyle(2,0,2);
outtextxy(100,20*i,"!");
printf("\n");
delay(500);
while (a != 0)
{
a = bits[b];
b++;
while (a > 64)
{
a--;
if (++c == 'Z')
{
c /= 9;
putchar(c);
}
else
{
putchar(33 ^ (b & 0x01));
}
count++;
if(count<1278)
{
SetColor(12);
}
else if(count>1227 && count<2455)
{
SetColor(15);
}
else if(count>2454)
{
SetColor(2);
}
}
delay(1);
}
SetColor(0);
return 0;
}