0

++a[1+rnd.nextInt(6)]; ?????????

loop runs 50 time it count number of time a number has acured that i get . But how does that statement work

1st Jan 2017, 11:23 AM
Amol Jandial
Amol Jandial - avatar
1 Réponse
+ 1
'a' is an array, generated random number is the index of it. The current value of index'th element of the array 'a' is increased by one for each iteration.
24th Jun 2019, 9:49 PM
merkinth