nY := 0;for i:=1 to n do if x[i]<k then begin inc(nY); y[nY] := x[i];end;// где к -заданное значение ...