1.uses crt; const n=20; var i,cp1,cn1: integer; p,cp,cn: real; z: array[1… n] of integer; beginrandomize; for i: =1 to n dobeginz[i]: =random (20,-20); if z[i]>=0 thenbegincp: =cp+z[i]; cp1: =cp1+1; endelsebegincn: =cp+z[i]; cn1: =cn1+1; end; cp: =cp/cp1; cn: =cn/cn1; end; if cp>cn thenp: =cp+cnelsep: =cp*cn; for i: =1 to n dowrite (z[i],'); writeln (#13#10,cp: 5:2,',cn: 5:2,',p: 5:2); end.2.uses crt; const n=15; m=4; var i,j,k,flag,count: integer; a: array[1… n,1… m] of integer; temp: array[1… 100] of integer; b: array[1… 100,1… m] of integer; beginrandomize; k: =1; count: =0; for i: =1 to n dobeginflag: =1; for j: =1 to m dobegina[i,j]: =random (51,1); if (a[i,j]<10) or (a[i,j]>40) thenflag: =0end; if flag=1 thenbegintemp[k]: =i; count: =count+1; k: =k+1; end; end; for i: =1 to count dofor j: =1 to m dob[i,j]: =a[temp[i],j]; writeln ('Массив A: '); for i: =1 to n dobeginfor j: =1 to m dowrite (a[i,j],'); write (#13#10); end; if count=0 thenwriteln ('Нет подходящих строк.') elsebeginwriteln (#13#10,'Массив B: '); for i: =1 to count dobeginfor j: =1 to m dowrite (b[i,j],'); write (#13#10); end; end; end.