Const n=5;
var a:array[1..n,1..n] of integer;
i,j:integer;
begin
for i:=1 to n do
begin
for j:=1 to i do a[i,j]:=n-i+j;
for j:=i+1 to n do a[i,j]:=0;
end;
for i:=1 to n do
begin
for j:=1 to n do write(a[i,j]:2);
writeln;
end;
end.
Результат:
5 0 0 0 0
4 5 0 0 0
3 4 5 0 0
2 3 4 5 0
1 2 3 4 5