Var
a: array[1..100,1..100] of integer; i, j,n: integer;
begin
write('Введите количество строк и столбцов:');
readln(n); for i := 1 to n do begin
for j := 1 to n do
if (n=i+j-1) then a[i,j]:=i
else a[i,j]:=0;
end;
writeln ('Массив: ');
for i := 1 to n do begin
for j := 1 to n do
write(a[i,j]:3, ' ');
writeln;
end;
readln;
end.