/* Screen Saver Program */ #include #include #include #include #include #include #include int main () { clrscr (); int gdriver = DETECT, gmode, errorcode; initgraph (&gdriver, &gmode, "c:\\tclite\\bgi"); errorcode = graphresult (); if (errorcode != grOk) { printf ("Graphics error: %s\n", grapherrormsg (errorcode)); printf ("Press Anykey to halt: "); getch (); exit (1); } /* "graphics main prorgam lines" go here */ randomize(); int i, x, y, maxx, maxy; maxx = getmaxx(); maxy = getmaxy(); unsigned color; //x=maxx; x = random (maxx); y = random (maxy); while (!kbhit()) { //color = random (getmaxcolor()); //setbkcolor(WHITE); //setbkcolor(color); //delay(1); //setbkcolor(BLACK); //delay (1); //setcolor (color); circle (x,y,5); //x++; //y++; if (x == maxx || x == 0) { } if (y == maxy || y == 0) { } } closegraph (); return 0; }