-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPROJEC~1.C
More file actions
63 lines (44 loc) · 1.65 KB
/
PROJEC~1.C
File metadata and controls
63 lines (44 loc) · 1.65 KB
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
#include<conio.h>
#include<stdio.h>
#include<graphics.h>
#include<dos.h>
int midx,midy;
void number8() {
//Main Code Starts From Here ..
delay(1000); //Time for Display
cleardevice(); //ClearScreen
delay(1000); //Time for New Number
//White Frame..
setcolor(WHITE);
//Set Color Of Rectangle..
setfillstyle(SOLID_FILL,RED);
rectangle(midx-130,midy-210,midx+130,midy+210); //Frame is drawn..
//Inside frame plot those rectangles which are generating Numbers & remove rest of rectangles..
rectangle(midx-80,midy-180,midx+80,midy-160);//Top Bar
floodfill(midx,midy-170,WHITE);//Fill Color Of Rect
rectangle(midx-100,midy-150,midx-80,midy-20);//Top Left Bar
floodfill(midx-90,midy-80,WHITE);
rectangle(midx+80,midy-150,midx+100,midy-20);//Top Right Bar
floodfill(midx+90,midy-80,WHITE);
rectangle(midx-70,midy-10,midx+70,midy+10);//Center Bar
floodfill(midx,midy,WHITE);
rectangle(midx-100,midy+20,midx-80,midy+150);//Bottom Left Bar
floodfill(midx-90,midy+80,WHITE);
rectangle(midx+80,midy+20,midx+100,midy+150);//Bottom Right Bar
floodfill(midx+90,midy+80,WHITE);
rectangle(midx-80,midy+160,midx+80,midy+180);//Bottom Bar
floodfill(midx,midy+170,WHITE);
}
void main() {
int gd=DETECT,gm;
initgraph(&gd,&gm,"C:\TC\BGI");
midx=getmaxx()/2; //Max X Cordinate/2
midy=getmaxy()/2; //Max Y/2
//---------------------Number 8 Plots Here---------------
number8();
//---------------------Number N Plots Here---------------
//Add New Function Inside Lines ..
//-----------------------------------------------------------------
getch();
closegraph();
}