program raf105;
var
a:array[1..5,1..5] of integer;
i,j,o: integer;
begin
o:=-2;
for i:=1 to 5 do
writeln;
for j:=1 to 5 do
if (j<=3+abs(o)) and (j>=3-abs(o))
then a[i,j]:=1
else a[i,j]:=0;
write(a[i,j],' ');
end;
o+= 1;
end.
program raf105;
var
a:array[1..5,1..5] of integer;
i,j,o: integer;
begin
o:=-2;
for i:=1 to 5 do
begin
writeln;
for j:=1 to 5 do
begin
if (j<=3+abs(o)) and (j>=3-abs(o))
then a[i,j]:=1
else a[i,j]:=0;
write(a[i,j],' ');
end;
o+= 1;
end;
end.
Язык PascalABC