program Project6; {$APPTYPE CONSOLE} var a:array[1..100] of integer; H1,H2,N,S,i:integer;m:real; begin writeln('Vvedit pochatkovyi rist Dmytryka'); readln(H1); writeln('Vvedit kincevyi rist Dmytryka'); readln(H2); writeln('Vvedit kilkist polychok'); readln(N);m:=(H2-H1)/2; for i:=1 to N do begin writeln('Vvedit bysotu ',i,' polychki'); readln(a[i]);end; for i:=1 to n do begin if h2>=a[i] then S:=S+1;end; writeln('Vin doberetsia do ',S,' polychki za ',m:0:0,' misiaciv'); readln; end.