Program zadacha;vars: array[1..20] of real;max,sr: real;i,n: integer;
beginwriteln('enter numbers');for i:=1 to 20 do read(s[i]);max:=s[1];for i:=2 to 5 do beginif s[i]>max then max:=s[i];end;sr:=0;n:=0;for i:=12 to 20 do beginsr:=sr+s[i]; inc(n);end;sr:=sr/n;for i:=1 to 20 do beginif s[i]>sr then s[i]:=max;end;
writeln('max 1-5 = ',max);writeln('sr 12-20 = ',sr:8:2);for i:=1 to 20 do write(s[i]:8:2);end.