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