in reply to Division Problem

You've already gotten great answers to your question, but I have a question for you:

Why not just use rand()?