Pascal.ABC.Net
uses GraphABC;
procedure MyCircle(var r,x:integer);
var
rc,y:integer;
begin
SetBrushColor(clRandom);
rc:=Random(50)+20;
if r>0 then x:=x+Trunc(2*sqrt(r*rc)) else x:=rc;
y:=WindowHeight-rc;
FillCircle(x,y,rc);
r:=rc
end;
var
i,r,x:integer;
begin
Randomize;
Window.SetSize(1000,600);
r:=0; x:=0;
for i:=1 to 10 do myCircle(r,x)
end.
Образец вывода дан во вложении.