|
-
Tiger Shark
Random Number Generator
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?
-
Reef Shark
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...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|