Document
Document
Document
h>
#include<graphics.h>
#include<conio.h>
#include<stdlib.h>
Int main()
Int gd,gm,n,*x,I,k=0;
Detectgraph(&gd,&gm);
Printf(“Window:-“);
Scanf(“%d”,&n);
X = malloc(n*2+1);
K=0;
Printf(“(x%d,y%d): “,k,k);
Scanf(“%d,%d”,&x[i],&x[i+1]);
K++;
}
X[n*2]=x[0]; //assigning the coordinates of first vertex to last additional vertex for
drawpoly method.
X[n*2+1]=x[1];
Setcolor(WHITE);
Drawpoly(n+1,x);
Getch();
Setcolor(RED);
Drawpoly(5,w);
Setfillstyle(SOLID_FILL,BLACK);
Floodfill(2,2,RED);
Getch();
Cleardevice();
Closegraph();
Return 0;
}#include<stdio.h>
#include<graphics.h>
#include<conio.h>
#include<stdlib.h>
Int main()
Int gd,gm,n,*x,I,k=0;
Detectgraph(&gd,&gm);
Printf(“Window:-“);
Scanf(“%d”,&n);
X = malloc(n*2+1);
K=0;
Printf(“(x%d,y%d): “,k,k);
Scanf(“%d,%d”,&x[i],&x[i+1]);
K++;
X[n*2]=x[0]; //assigning the coordinates of first vertex to last additional vertex for
drawpoly method.
X[n*2+1]=x[1];
Setcolor(WHITE);
Drawpoly(n+1,x);
Getch();
Setcolor(RED);
Drawpoly(5,w);
Setfillstyle(SOLID_FILL,BLACK);
Floodfill(2,2,RED);
Getch();
Cleardevice();
Closegraph();
Return 0;