Var r:array[1..100,1..100] of integer;i,j,n,k,sum:integer; p:double; b:array[1..30]of integer;beginp:=1;randomize;write('Введите n: ');readln(n); writeln('Исходная матрица: ');for i:=1 to n dobeginfor j:=1 to n dobeginr[i,j]:=random(10)-5;write(r[i,j]:4);end;writeln;end; writeln;for i:=1 to n dobeginfor j:=1 to n dobeginif i>=j then beginwrite(r[i,j]:4);if r[i,j]> 0 then begin k:= k + 1; p:= p * r[i,j]; b[k]:= r[i,j]; end;end elsewrite(' ':4);end;writeln;end;writeln('p = ', p);writeln(b);end.
writeln('Исходная матрица: ');for i:=1 to n dobeginfor j:=1 to n dobeginr[i,j]:=random(10)-5;write(r[i,j]:4);end;writeln;end;
writeln;for i:=1 to n dobeginfor j:=1 to n dobeginif i>=j then beginwrite(r[i,j]:4);if r[i,j]> 0 then begin k:= k + 1; p:= p * r[i,j]; b[k]:= r[i,j]; end;end elsewrite(' ':4);end;writeln;end;writeln('p = ', p);writeln(b);end.