generate random
#1

Hi,

I want generate random, but not include some numbers, i'am thinking using while, but it's possible that there never can by random so this can harm server.. I do random(50)
Reply
#2

Generate a random number, check if it is a number you want to exclude, if it is, generate another random number, check again, and so on ... A while is indeed what you should use.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)