This:

n from 0 to 99, initialize the nth element stored in array as a random value between 0 and 10.

should read:

n from 0 to 999, initialize the nth element stored in array as a random value between 0 and 10.