I program in c++. I made a program that producded a random number between 0-100. Is there a way that i can make it so that when the number is generated it cancels that number out so that it dosen't print it out again?
Printable View
I program in c++. I made a program that producded a random number between 0-100. Is there a way that i can make it so that when the number is generated it cancels that number out so that it dosen't print it out again?
I suppose you could input every number into an array or something... then everytime you get a new number have it check it against the array... if it is in the array then have it generate a new one... and so on...
i think that would work...