Sign in to follow this  
lakers34kb

Random number generator

Recommended Posts

Is it possible to generate a random 6 digit number, but only using the numbers 1,2,3,4,5,6 and not having it repeat any numbers within. Example: 345621 124356 453216 1,2,3,4,5,6 has to be used once, so its basically scrambling the 6 numbers

Share this post


Link to post
Share on other sites
Though your programming language may have a library function to do so out of the box. Ex: for C++ look up the random_shuffle() function.

Share this post


Link to post
Share on other sites
I just though of something.

I guess I want to scramble the number 123456, kind of like word scrambler where you take comfort and make it trofocm

I want to do the same thing with 123456, but have a whole list of it.

Share this post


Link to post
Share on other sites
Again, if you want all the permutations of a set your programming language may have a library function to do it. Ex: for C++ look up the next_permutation() function.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this