Const
n = 10;
var
i, j: integer;
a: array[1..n, 1..n] of integer;
begin
for i := 1 to n do
for j := 1 to n do
if i = j then a[i, i] := n - i + 1
else a[i, j] := 0;
writeln;
for i := 1 to n do
begin
for j := 1 to n do write(a[i, j]:4);
writeln
end
end.
10 0 0 0 0 0 0 0 0 0
0 9 0 0 0 0 0 0 0 0
0 0 8 0 0 0 0 0 0 0
0 0 0 7 0 0 0 0 0 0
0 0 0 0 6 0 0 0 0 0
0 0 0 0 0 5 0 0 0 0
0 0 0 0 0 0 4 0 0 0
0 0 0 0 0 0 0 3 0 0
0 0 0 0 0 0 0 0 2 0
0 0 0 0 0 0 0 0 0 1