first

Download First

If you can't read please download the document

Upload: 16rock9999

Post on 14-Nov-2015

213 views

Category:

Documents


1 download

DESCRIPTION

c

TRANSCRIPT

#include #include #include #include int main(void){ /* request auto detection */ int gdriver = DETECT, gmode, errorcode; int xmax, ymax; int i,ht,y; struct palettetype pal; getpalette(&pal); /* initialize graphics and local variables */ initgraph(&gdriver, &gmode, ""); /* read result of initialization */ errorcode = graphresult(); /* an error occurred */ if (errorcode != grOk) { printf("Graphics error: %s\n", grapherrormsg(errorcode)); printf("Press any key to halt:"); getch(); exit(1); } setcolor(getmaxcolor()); xmax = getmaxx(); ymax = getmaxy(); /* draw a diagonal line */ // setfillstyle(SOLID_FILL, RED); for (i=0; i