Generate in Java, N number of Random numbers within a range (0-R) and the total of N random number should be R
I need to generate an N number of random numbers within a range from 0 to R. The total of N random numbers should be equal to R. How can I write a code in Java with a few line code?
Aucun commentaire:
Enregistrer un commentaire