jeudi 25 février 2016

How to generate random numbers using only specific digits, e.g [1234] [4213] [3124]

In VB.NET I am trying to figure out how exactly to generate numbers of a fixed length using specific digits.

I have seen these questions but they do not cover what I am looking for:
Generating random integers in a specific range
Produce a random number in a range using C#
How to generate random number with the specific length in python
Generating an array of random strings
Generation 9 digits random number including leading zero

I am trying to generate 4 digit numbers using only 1, 2, 3, and 4.
It would be like this:

1234  
2134  
3124  
2143  
2431  
2413  

etc...
Can someone explain to me how this can be achieved?




Aucun commentaire:

Enregistrer un commentaire