I know that you can scale random numbers down to a range that you want. For instance I know that I can generate a random number between [m,n] inclusive.
What I want to do is generate a random number between [m,n], BUT I want to exclude certain numbers in this range. For example let's say that I wanted to generate a random number between 4 and 10,but I want to exclude 6 and 8. How could I do that? Is it just as simple as something like this:
rand() !=6 && !=8;
I know that the above code is not correct,but am I on the right track?
As an addendum as I continue to generate random numbers I want to exclude the random numbers that I have generated. For example lets say that I generate 7, now I want to exclude 6,8,and 7