Const nx=30;var i,j,p,n:integer;A:array[1..nx,1..nx] of integer;d,Sn,min:real;begin p:=1;write('Введите размер матрицы');Read(n);for i:=1 to n do beginfor j:=1 to n do beginA[i,j]:=random(3)-2;write(A[i,j]:4);end;writeln;end;writeln;writeln;for i:=1 to n do beginfor j:=1 to n do beginif i = j then begin if A[i,j]<> 0 then p:=p* A[i,j];write(A[i,j]:4);endelse write(' ':4);end;writeln;end;write('p =',p);writeln;writeln;for i:=1 to n do beginfor j:=1 to n do beginif (i= n -j +1) then begin if A[i,j]<> 0 then p:=p* A[i,j];write(A[i,j]:4);endelse write(' ':4);end;writeln;end;write('p =',p);end.