Program to Draw a Polygon

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>

void main()
{
  clrscr();
  int gm=DETECT,gd,i;
  int polypts[10]={10,10,10,100,180,50,110,200,10,10};
     initgraph(&gm,&gd,"");

   drawpoly(5,polypts);

  getch();
}

Leave a Reply