Uses graphABC;
var x1,y1,x2,y2,k:integer;
procedure paintline(var x1,y1,x2,y2,k:integer);
begin;
x1:=x2;
y1:=y2;
x2:=x2+10;
line(x1,y1,x2,y2);
x1:=x2;
y2:=y2-10;
line(x1,y1,x2,y2);
y1:=y2;
x2:=x2+10;
line(x1,y1,x2,y2);
x1:=x2;
y2:=y2+10;
line(x1,y1,x2,y2);
inc(k);
if k<3 then paintline(x1,y1,x2,y2,k);<br>end;
begin;
x2:=20;
y2:=20;
k:=0;
paintline(x1,y1,x2,y2,k);
x1:=x2;
y1:=y2;
x2:=x2+10;
line(x1,y1,x2,y2);
end.