69,371
社区成员
发帖
与我相关
我的任务
分享
#include <graphics.h>
#include <bios.h>
#include <conio.h>
main()
{
int n=1,m=1,x=320,y=240,r=25,xl=15,yl=15,devce=VGA,mode=VGAHI;
initgraph(&devce,&mode,"c:\\tc");
while(!bioskey(1))
{
if((x+r>640)||(x-r<0))
n=-n;
x+=n;
if((y+r>480)||(y-r<0))
m=-m;
y+=m;
circle(x,y,25); delay(500); cleardevice();
}
}