I apologize to the Internet and I can not find the answer as randomly get one of the specified numbers . For example, I asked 1, 6, 11, 16, 21 … and I need one of them by chance. Help.
Answer 1, Authority 100%
JavaScript :
var arr = new array (100, 101, 102, 103, 104, 105, 106, 107, 108) ; // Some array of numbers
var randelement = arr [math.floor (math.random () * (arr.length)]; // Selection of the Random Element
C #
Suppose that in int [] array, the length of which N, contains all these numbers that you need.
Then with the help of such a code you can get a random of them:
int [] array = new int [n]; // here contain all your numbers, their number n
Random RND = New Random (datetime.Now.seconds); // Generator (pseudo) random numbers
// Arghent Random Designer can take any integer value
INT RANDOMNUMBER = Array [rnd.next (0, N)]; // We get a random element from the array array