Код в Turbo Pascal: USES Graph,CRT; VAR x,y,dx,dy,Device,Mode,i: Integer; BEGIN Device:=0; InitGraph(Device,Mode,''); x:=10; y:=10; dx:=1; dy:=1; i:=1; Repeat SetColor(Cyan); Circle(x,y,10); SetFillStyle(1,3); FloodFill(x,y,Cyan); Delay(10); SetColor(Black); Circle(x,y,10); SetFillStyle(1,0); FloodFill(x,y,Black); x:=x+dx; y:=y+dy; if (x>300) OR (y>200) then begin x:=10; y:=10; i:=i+1; end;
USES Graph,CRT;
VAR x,y,dx,dy,Device,Mode,i: Integer;
BEGIN
Device:=0;
InitGraph(Device,Mode,'');
x:=10; y:=10;
dx:=1; dy:=1;
i:=1;
Repeat
SetColor(Cyan);
Circle(x,y,10);
SetFillStyle(1,3);
FloodFill(x,y,Cyan);
Delay(10);
SetColor(Black);
Circle(x,y,10);
SetFillStyle(1,0);
FloodFill(x,y,Black);
x:=x+dx; y:=y+dy;
if (x>300) OR (y>200) then
begin
x:=10;
y:=10;
i:=i+1;
end;
until i>5;
END.