I'm trying to produce four random numbers between 0 and 100 which will equal to 100.
I've managed to produce the outcome, but it isn't efficient. My method just keeps looping random numbers between 0-100, then adds them, if it doesn't equal to 100 then repeats the process until it equals to 100. Is there a more efficient method?
Thanks in advance
Aucun commentaire:
Enregistrer un commentaire