Print in the middle on the screen

/* using graphics */
#include
#include
main()
{
int gd=DETECT,gm,midx,midy;
int i=1;
initgraph(&gd,&gm,"d:\\cpp\\bgi");
midx=getmaxx()/2;
midy=getmaxy()/2;
/* print in the middle on the screen */
while(i<500)
{
setcolor(i);
circle(midx,midy,10+i);
sound(200+i);
delay(30);
i=i+10;
}
nosound();
getch();

}

No comments:

Post a Comment