-
Notifications
You must be signed in to change notification settings - Fork 0
/
MAGIC4.C
169 lines (152 loc) · 4.67 KB
/
MAGIC4.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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
#include<conio.h>
#include<graphics.h>
#include"magic5.c"
//#include<rsl.c>
void page4(int c)
{
int gd=DETECT,gm,k=50,i,g,l,z=0,p4=1,r=0;
initgraph(&gd,&gm,"..\\bgi");
// setbkcolor(WHITE);
setfillstyle(SOLID_FILL,WHITE);
circle(30+170+20+30+30+30,12,2);
floodfill(30,170,WHITE);
setcolor(BLACK);
circle(30+170+20,12,2);
setfillstyle(SOLID_FILL,WHITE);
circle(30+170+20+30+30+30,12,2);
floodfill(30,170,WHITE);
setcolor(BLACK);
circle(30+170+30+20,12,2);
setcolor(BLACK);
circle(30+170+60+20,12,2);
setcolor(BLACK);
circle(30+170+30+60+30+20,12,2);
setcolor(BLACK);
circle(30+170+30+60+30+20+30,12,2);
setcolor(BLUE);
rectangle(190,440,270,470);
rectangle(190+150,440,270+150,470);
setcolor(BLUE);
setfillstyle(SOLID_FILL,BLUE);
circle(30+170,120-70,20);
floodfill(32+170,121-70,BLUE);
// setcolor(WHITE);
// settextstyle(1,0,2);
// outtextxy(32,121,"1");
setfillstyle(SOLID_FILL,BLUE);
circle(30+70+170,120-70,20);
floodfill(101+170,121-70,BLUE);
setfillstyle(SOLID_FILL,BLUE);
circle(101+70+170,120-70,20);
floodfill(101+70+170,121-70,BLUE);
setfillstyle(SOLID_FILL,BLUE);
circle(101+70+70+170,120-70,20);
floodfill(101+70+70+170,121-70,BLUE);
for(i=1;i<8;i++)
{
setfillstyle(SOLID_FILL,BLUE);
circle(30+170,120+k-70,20);
floodfill(32+170,121+k-70,BLUE);
// setcolor(WHITE);
// settextstyle(1,0,2);
// outtextxy(32,121,"1");
setfillstyle(SOLID_FILL,BLUE);
circle(30+70+170,120+k-70,20);
floodfill(101+170,121+k-70,BLUE);
setfillstyle(SOLID_FILL,BLUE);
circle(101+70+170,120+k-70,20);
floodfill(101+70+170,121+k-70,BLUE);
setfillstyle(SOLID_FILL,BLUE);
circle(101+70+70+170,120+k-70,20);
floodfill(101+70+70+170,121+k-70,BLUE);
k=k+50;
}
setcolor(WHITE);
outtextxy(101+70+70-7+170,100,"15");
outtextxy(241+170-70-7,100,"13");
outtextxy(241+170-70-70-7,100,"11");
outtextxy(241+170-70-70-70-7,100,"9");
outtextxy(241+170-70-7,100-50,"5");
outtextxy(241+170-70-70-7,100-50,"3");
outtextxy(241+170-70-70-7-70,100-50,"1");
outtextxy(101+70+70-7+170,100-50,"7");
outtextxy(101+70+70-7+170,100+50,"23");
outtextxy(241+170-70-7,100+50,"21");
outtextxy(241+170-70-7-70,100+50,"19");
outtextxy(241+170-70-7-70-70,100+50,"17");
outtextxy(241+170-70-7-70-70,100+50+50,"25");
outtextxy(241+170-70-7-70,100+50+50,"27");
outtextxy(241+170-70-7-70+70,100+50+50,"29");
outtextxy(241+170-70-7-70+70+70,100+50+50,"31");
outtextxy(241+170-70-7-70+70+70,100+50+50+50,"39");
outtextxy(241+170-70-7-70+70+70-70,100+50+50+50,"37");
outtextxy(241+170-70-7-70+70-70,100+50+50+50,"35");
outtextxy(241+170-70-7-70+70-70-70,100+50+50+50,"33");
outtextxy(241+170-70-7-70+70+70,100+50+50+50+50,"47");
outtextxy(241+170-70-7-70+70+70-70,100+50+50+50+50,"45");
outtextxy(241+170-70-7-70+70+70-70-70,100+50+50+50+50,"43");
outtextxy(241+170-70-7-70+70+70-70-70-70,100+50+50+50+50,"41");
outtextxy(241+170-70-7-70+70+70-70-70-70,100+50+50+50+50+50,"49");
outtextxy(241+170-70-7-70+70+70-70-70-70+70,100+50+50+50+50+50,"51");
outtextxy(241+170-70-7-70+70+70-70-70-70+70+70,100+50+50+50+50+50,"53");
outtextxy(241+170-70-7-70+70+70-70-70-70+70+70+70,100+50+50+50+50+50,"55");
outtextxy(241+170-70-7-70+70+70-70-70-70,100+50+50+50+50+50+50,"57");
outtextxy(241+170-70-7-70+70+70-70-70-70+70,100+50+50+50+50+50+50,"59");
outtextxy(241+170-70-7-70+70+70-70-70-70+70+70,100+50+50+50+50+50+50,"*");
outtextxy(241+170-70-7-70+70+70-70-70-70+70+70+70,100+50+50+50+50+50+50,"*");
setcolor(BLACK);
settextstyle(8,0,3);
outtextxy(207,440,"YES");
settextstyle(1,0,1);
outtextxy(365,445,"NO");
while(1)
{
g=getch();
// printf("%d",g);
switch(g)
{
case 00:
{
l=getch();
switch(l)
{
case 77:
{
setcolor(BLUE);
rectangle(190,440,270,470);
setcolor(RED);
rectangle(190+150,440,270+150,470);
z=1;
r=0;
break;
}
case 75:
{
setcolor(RED);
rectangle(190,440,270,470);
setcolor(BLUE);
rectangle(190+150,440,270+150,470);
z=1;
r=1;
break;
}
}
break;
}
case 27:exit(0);break;
case 13:
{
if(z==1&&r==1)
{
//c=c+p4;
page5(c+p4);break;
}
else
{
c=c+0;
page5(c);break;
}
}
}
}
}