#include <graphics.h>
#include <conio.h>
#include <stdio.h>
int main()
{
int width = 800;//窗口长度
int height = 600;//窗口宽度
initgraph(width, height);//窗口初始化,长800,高600
int x = 400;//小球横坐标
int y = 300;//小球纵坐标
int radius = 50;//小球半径
fillcircle(400, 300, 1000);//画圆,中心点(400,300),半径100
for(y=300;y<height;y+y+10)//利用循环让小球不停下落
{
y = y + 10;//小球纵坐标加10,向下移动10
cleardevice();//清屏,消除上一个圆
fillcircle(x, y, radius);//重新画小球
Sleep(100);//暂停100毫秒
}
return 0;
}