Const nx=20;var i,j,n:integer; D:array[1..nx,1..nx] of integer; begin write('Введите размер матрицы n');Readln(n); for i:=1 to n do begin for j:=1 to n do begin D[i,j]:= random(100)-50;write(D[i,j]:4);end;writeln;end;writeln;writeln; for i:=1 to n do begin for j:=1 to n do begin if D[i,j] >0 then D[i,j]:= D[i,j]*(-1);write(D[i,j]:4);end;writeln;end;end.
begin
write('Введите размер матрицы n');Readln(n);
for i:=1 to n do begin
for j:=1 to n do begin
D[i,j]:= random(100)-50;write(D[i,j]:4);end;writeln;end;writeln;writeln;
for i:=1 to n do begin
for j:=1 to n do begin
if D[i,j] >0 then D[i,j]:= D[i,j]*(-1);write(D[i,j]:4);end;writeln;end;end.