var
A: array [1..9, 1..9] of Integer;
i, j: Integer;
begin
WriteLn ('Массив:');
for i := 1 to 9 do begin
for j := 1 to 9 do begin
if Abs (i - 5) + Abs (j - 5) <= 3 then
A [i, j] := 1
else
A [i, j] := 0;
end;
Write (A [i, j], ' ');
WriteLn;
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
var
A: array [1..9, 1..9] of Integer;
i, j: Integer;
begin
WriteLn ('Массив:');
for i := 1 to 9 do begin
for j := 1 to 9 do begin
if Abs (i - 5) + Abs (j - 5) <= 3 then
A [i, j] := 1
else
A [i, j] := 0;
end;
end;
for i := 1 to 9 do begin
for j := 1 to 9 do begin
Write (A [i, j], ' ');
end;
WriteLn;
end;
end.