Const n=10; var a:array[1..n] of integer; i,cntp,cnto:integer; begin randomize; cntp:=0; cnto:=0; for i:=1 to n do begin a[i]:=random(21)-5; writeln(a[i]); if a[i]>=0 then inc(cntp) else inc(cnto); end; writeln; if cntp>cnto then writeln('Положительных больше') else writeln('Отрицательных больше'); if cntp=cnto then writeln('Одинаково'); end.
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota
Оформи подписку