Generates a random number in a user specified range