#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
void main()
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
int maxx, maxy;
/* our polygon array */
int poly[10];
/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "C:\\TC\\BGI");
/* read result of initialization */
errorcode = graphresult();
if (errorcode != grOk)
/* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
/* terminate with an error code */
exit(1);
}
// printf("Enter the ")
int a[8]={25,25,32,20,30,40,25,25}, b[8], c[8],i;
drawpoly(4,a);
for( i=0;i<=8;i++)
b[i]=(a[i]*2)+100;
drawpoly(4,b);
for(i=0;i<=8;i++)
c[i]=(b[i]*2)+100;
drawpoly(4,c);
getch();
}
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
void main()
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
int maxx, maxy;
/* our polygon array */
int poly[10];
/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "C:\\TC\\BGI");
/* read result of initialization */
errorcode = graphresult();
if (errorcode != grOk)
/* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
/* terminate with an error code */
exit(1);
}
// printf("Enter the ")
int a[8]={25,25,32,20,30,40,25,25}, b[8], c[8],i;
drawpoly(4,a);
for( i=0;i<=8;i++)
b[i]=(a[i]*2)+100;
drawpoly(4,b);
for(i=0;i<=8;i++)
c[i]=(b[i]*2)+100;
drawpoly(4,c);
getch();
}
No comments:
Post a Comment