An algorithm for the linear complementarity problem with upper and lower bounds