Const n=10; var a: array[1..n] of real; k1,k2,i: integer; begin randomize; for i: =1 to n do begin a[i]: =2*random-1; write(a[i]: 7: 2); end; writeln; k1: =0; k2: =0; for i: =1 to n do if a[i]> 0 then k1: =k1+1 else k2: =k2+1; writeln('k1 = ',k1,' k2 = ',k2); writeln('количество положительных / количество отрицательных = ',k1/k2); end. пример: -0.85 0.53 -0.71 -0.14 0.53 -0.17 0.66 0.21 0.08 0.63 k1 = 6 k2 = 4 количество положительных / количество отрицательных = 1.5
stertumasova29
03.02.2021
Var n,pi,ti,max,min,i: integer; name,m_name: string; begin readln(n); max: =0; min: =5000; for i: =1 to n do begin readln(name); readln(pi,ti); if pi> max then begin m_name: =name; max: =pi; min: =ti; end else if pi=max then if ti< min then begin m_name: =name; max: =pi; min: =ti; end; end; writeln(m_name); end. пример: 4 john 10 123 ringo 10 144 george 11 156 paul 11 160 george