To write a program which draw the flag of Pakistan using graphic mode follow the following commands.
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
#include<graphics.h>
#include<time.h>
void main(void)
{
clrscr();
int d, m;
d=EGA;
m=EGAHI;
init graph(&d, &m, “c\\tc\\bgi”);
setfillstyle(1,2);
bar(1,1,640,350);
setfillstyle(1,15)
bar(1,1,175,350);
setfillstyle(1,15);
setcolor(15);
circle(320,160,100);
floodfill(320,160,15);
setfillstyle(1,2);
setcolor(2);
circle(340,140,100);
floodfill(340,140,2);
getche();
}