#include #include #include main() { int gd=DETECT, gm,x,y; int arr[]={540,220,590,270,570,320,510,320,490,270,540,220}; initgraph(&gd,&gm,"c:\\tc\\bgi"); x=getmaxx(); y=getmaxy(); setcolor(GREEN); printf(" \n value of x = %d",x); printf(" and the value of y = %d",y);
rectangle(5,40,140,200); outtextxy(x/30+15,y/8+5,"Rectangle");
drawpoly(6,arr); outtextxy(515,270,"Polygon"); setcolor(RED); line(0,49,639,479); line(0,0,0,479); line(0,0,639,0); line(639,0,639,479);
getch(); closegraph(); restorecrtmode(); }
|
No responses found. Be the first to respond and make money from revenue sharing program.
|