Category : C Source Code
Archive   : CBIBLE.ZIP
Filename : GETX.C

 
Output of file : GETX.C contained in archive : CBIBLE.ZIP
/* getx */
#include
#include
#include

main()
{
int graphdriver = DETECT, graphmode;
int oldx,oldy;
char buffer[80];

/* Initialize the graphics system */
initgraph(&graphdriver,&graphmode,"c:\\turboc");
outtextxy(10,20,"Demonstrating getx and gety");
/* Draw random polygons with three vertices */
randomize();
moveto(random(getmaxx()),random(getmaxy()));
/* Save first point ot close the figure */
oldx =getx();
oldy =gety();
/* Draw two line segments */
lineto(random(getmaxx()),random(getmaxy()));
lineto(random(getmaxx()),random(getmaxy()));
/* Now draw a line to first point to close to close figure */
lineto(oldx,oldy);
/* Give user a chance to see the result */
outtextxy(10,270,"Hit any key to exit:");
getch();
closegraph(); /* Close graphics system */
}

  3 Responses to “Category : C Source Code
Archive   : CBIBLE.ZIP
Filename : GETX.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/