Const nx=30;var i,j,n,max,sum:integer;
A:array[1..nx,1..nx]of integer;
begin
max:=-100;
write('Введите количество элементов n');Readln(n);
for i:=1 to n do begin
for j:=1 to n do begin
A[i,j]:= random(25)-15;
write(A[i,j]:4);end;writeln;end;
for i:=1 to n do begin
for j:=1 to n do begin
if (i>n-j) and (i >= j)then begin
if max < A[i,j] then max := A[i,j];sum:= sum + A[i,j];
write(A[i,j]:4); end
else
write(' ':4);end;writeln;end
;write('max =',max:4,' sum =',sum:4);end.