Obviously, you shouldn't have plugged in your, say, baby creating instrument so frequently. Do I have to explain every detail here? Don't you folks understand anything? It's still your own fault. So there.

kind regards,

Jos ;-)

The only person who got everything done by Friday was Robinson Crusoe.

I dislike infinite loops as well but a lot of times creating an extra variable is unnecessary.

The continue and break might not be the most elegant, but it makes more sense and he needs to understand the concept.

But spoon feeding without at least seeing some of the fruits of the OP's effort will do the opposite -- he'll hand in your code and won't understand things nearly as well as he could have if we had been able to engage a conversation with him as Darryl and the others were trying to do. I understand why some do it here -- it's a heck of a lot easier to dump in a code solution than to take the time to work with the OP to help him understand a concept, but that doesn't make it right.