Const
n=9;
var
a:array[1..n,1..n] of integer;
i,j:integer;
begin
for i:=1 to n do begin
for j:=1 to n do begin
if j=n-i+1 then a[i,j]:=i else a[i,j]:=0;
Write(a[i,j]:3)
end;
Writeln
end;
end.
Пример
0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 2 0
0 0 0 0 0 0 3 0 0
0 0 0 0 0 4 0 0 0
0 0 0 0 5 0 0 0 0
0 0 0 6 0 0 0 0 0
0 0 7 0 0 0 0 0 0
0 8 0 0 0 0 0 0 0
9 0 0 0 0 0 0 0 0