How to solve this random integer generation problem?



Question:


Given a program which can generate one of {1, 2, 3, 4, 5} randomly.
How can we get another generator which can generate one of
{1,2,3,4,5,6,7} randomly?


Please help.

.