Program mas; const n=50; var a: array [1..n] of integer; i,Pp,Pm: integer; begin randomize; Pp:=1; Pm:=1; for i:=1 to n do a[i]:=Random(100)-50; for i:=1 to n do begin if(a[i]<0) then Pm:=Pm*a[i]; if(a[i]>0) then Pp:=Pp*a[i]; end; writeln('произв. положительных: ',Pp); writeln('произв. отрицательных: ',Pm); end.
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota
Оформи подписку