Const n=50;
var a:array[1..n] of integer;
k,i:integer;
begin
Randomize;
for i:=1 to n do begin
a[i]:=random(51)+150;
write(a[i],' ');
end;
writeln;
k:=0;
for i:=1 to n do
if a[i]>=170 then k:=k+1;
writeln('k = ',k);
end.
Пример (для n=10):
157 183 166 153 200 151 200 180 161 175
k = 5