Exe6.4: the solution given in Pil 1st edition

More clear than a lot of `break`s.