Quote:
I'm still not able to figure out how to generate a random number from list of number only once.
The 'only once' make your number not random, because random imply the possibility of repeat.
You are looking for 'shuffle', just like with playing cards.
Shuffle on computer:
make an array of size 52 and store each card in the array. Cards are at positions 0 to 51.
Draw a number between 0 and 51, swap that card with the 1 at position 0.
Draw a number between 1 and 51, swap that card with the 1 at position 1.
Draw a number between 2 and 51, swap that card with the 1 at position 2.
Draw a number between 3 and 51, swap that card with the 1 at position 3.
and so on until only last card remain.
Then you read the array in order as you need, you will not draw the same card 2 times until the end of array.