in reply to making random number

Since it is h*o*m*e*w*o*r*k, the entire purpose of the exercise is for you to figure it out ... as so many others before you have dutifully done ... for yourself.