-2
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include<dos.h>

int main(void)
{
   int gdriver = DETECT, gmode, errorcode,i;
   int midx, midy;
   int radius = 100;
   initgraph(&gdriver, &gmode, "c:\\tc\\bgi");
   errorcode = graphresult();
   midx = getmaxx() / 2;
   midy = getmaxy() / 2;
   setcolor(getmaxcolor());
   for(i=5;i<=90;i+=2)
   {
   delay(50);
   setcolor(i);
   circle(midx+i, midy-i, radius);
   setcolor(i);
   circle(midx+i, midy+i, radius);
   setcolor(i);
   circle(midx-i, midy-i, radius);
   setcolor(i);
   circle(midx-i, midy+i, radius);
   }
   for(i=5;i<=120;i+=2)
   {
   delay(50);
   setcolor(i);
   circle(midx, midy-i, radius);
   setcolor(i);
   circle(midx+i, midy, radius);
   setcolor(i);
   circle(midx-i, midy, radius);
   setcolor(i);
   circle(midx, midy+i, radius);
   }

   getch();
   closegraph();
   return 0;
}
Votes + Comments
Cluttering up the boards with outdated, non-standard code.
3
Contributors
2
Replies
4
Views
6 Years
Discussion Span
Last Post by josephbeluan
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.