catch22
03-31-2003, 09:55 AM
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?
|
Click to See Complete Forum and Search --> : Random Number Generator catch22 03-31-2003, 09:55 AM 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? BlueChair 03-31-2003, 12:28 PM 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... SharkyExtreme.com
Copyright Internet.com Inc. All Rights Reserved. |