program Massiv;
var a:array [1..6,1..6] of integer;
i,j:integer;
begin
writeln('Массив ');
for i:=1 to 6 do
for j:=1 to 6 do
if i=j then a[i,j]:=i
else
if j>i then a[i,j]:=2
else a[i,j]:=3;
a[6,1]:=1;
write(a[i,j]:3)
end;
writeln
end
end.
// PascalABC.NET
var a := MatrFill(6, 6, 2);
for var i := 0 to 5 do
a[i, i] := i + 1;
for var i := 1 to 5 do
for var j := 0 to i - 1 do
a[i, j] := 3;
a[5, 0] := 1;
a.Print
program Massiv;
var a:array [1..6,1..6] of integer;
i,j:integer;
begin
writeln('Массив ');
for i:=1 to 6 do
begin
for j:=1 to 6 do
begin
if i=j then a[i,j]:=i
else
if j>i then a[i,j]:=2
else a[i,j]:=3;
a[6,1]:=1;
write(a[i,j]:3)
end;
writeln
end
end.
// PascalABC.NET
begin
var a := MatrFill(6, 6, 2);
for var i := 0 to 5 do
a[i, i] := i + 1;
for var i := 1 to 5 do
for var j := 0 to i - 1 do
a[i, j] := 3;
a[5, 0] := 1;
a.Print
end.