Wrap enabled
uses Graph;
const
delta: array[1 .. 4] of record
X, Y: integer;
end =
((X:-1; Y: 0), (X: 0; Y:-1),
(X: 1; Y: 0), (X: 0; Y: 1));
var
grDriver, grMode, ErrCode: Integer;
len, i, j: integer;
begin
grDriver := Detect;
InitGraph(grDriver, grMode,'');
ErrCode := GraphResult;
if ErrCode <> grOk then begin
Writeln('Graphics error:', GraphErrorMsg(ErrCode));
readln; halt
end;
len := 10;
moveto(getmaxx div 2, getmaxy div 2);
for i := 1 to 10 do begin
for j := 1 to 2 do linerel(delta[j].X*len, delta[j].Y*len);
inc(len, 10);
for j := 3 to 4 do linerel(delta[j].X*len, delta[j].Y*len);
inc(len, 10)
end;
readln;
closegraph;
end.
Примерно