mardi 21 avril 2015

radom generator Rand9() using Rand3()

How can I generate a number between 1 and 9 using a function which generate a number between 1 and 3? The probability to obtain any number between 1 and 9 must be the same, so rand3()+rand3()+rand3() is not a good solution.




Aucun commentaire:

Enregistrer un commentaire