dimanche 23 avril 2017

Is it possible to change range of random numbers?

I have an array of non repeating random numbers generated in the range of 0-20 as

int[] numbers = {6,14,11,18,13};

Now, I want to convert these numbers in the range of 0-10 and I want result as non repeating as well.

Is it possible ?

Any kind of suggestion would be appreciated.




Aucun commentaire:

Enregistrer un commentaire