C Program to Draw a FLAG using Line, Arc and Ellipse in Graphics

#include<graphics.h>
#include<stdio.h>
#include<conio.h>
void main()
{
  int gd = DETECT, gm;
  initgraph(&gd, &gm, "C:\\TC\\BGI");
  line(100,100,200,200);
  line(100,100,100,400);
  line(100,200,200,200);
  line(100,200,200,300);
  line(100,300,200,300);
  arc(130,170,180,360,10);
  ellipse(130,270,0,360,20,10);
  getch();
  closegraph();
}

OUTPUT:

1 comment: