jeudi 10 mai 2018

Generating random numbers with given probabilities in C++

How do I generate a random number between 0 and 100 in C++ using rand() function when the probability of getting 0 is 10%, 1 is 7% and the probability of getting rest of the number is equal?




Aucun commentaire:

Enregistrer un commentaire