-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5.c
More file actions
30 lines (23 loc) · 673 Bytes
/
5.c
File metadata and controls
30 lines (23 loc) · 673 Bytes
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
//5. WAP to draw 3 rectangles with different fill styles. [Hint: use setfillstyle() and floodfill() functions.
#include<graphics.h>
#include<stdio.h>
#include<conio.h>
void main()
{
int gdrive=DETECT,gmode;
initgraph(&gdrive,&gmode,"C:/TURBOC3/BGI");
rectangle(10,50,250,180);
setfillstyle(SOLID_FILL,12);
floodfill(60,165,WHITE);
rectangle(10,250,250,370);
setfillstyle(HATCH_FILL,BLUE);
floodfill(60,260,WHITE);
rectangle(300,50,550,180);
setfillstyle(LINE_FILL,4);
floodfill(500,80,WHITE);
rectangle(300,250,550,370);
setfillstyle(LTSLASH_FILL,11);
floodfill(310,260,WHITE);
getch();
closegraph();
}