69,371
社区成员
发帖
与我相关
我的任务
分享
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
main()
{
int graphdrv=VGA;
int graphmode=VGAHI;
int v10,v20,x1,x2,y=200,r;
float t;
printf("Please input the number:");
printf("\n");
scanf("v10=%d,v20=%d",&v10,&v20);
initgraph (&graphdrv,&graphmode," \\TC\\bgi");
for(t=0;t<=10;t=t+0.01)
{
cleardevice();
x1=10-v10*t,x2=220-v20*t;
for(r=1;r<=10;r++)
{
circle(x1,y,r),circle(x2,y,r);
}
}
closegraph();
}