I want to generate a 100 unique random numbers, but the numbers need to be in the range of 1-10. Right now i am doing this...
for (int i = 0; i < 100; i++) {
int n = rand.nextInt(10) + 1;
arr[i] = n;
}
The numbers could be float or double as long as they are unique and between the range of 1-10.
Aucun commentaire:
Enregistrer un commentaire