I want to make a program that will generate a random number. I know I need to use Math.random() for this but I want to set a ratio for a number that can repeat. for example, I want the compiler to give a number from 1-10 but I want 5 repeat 3 times more than another number. how do I do that? please help thank you.
Aucun commentaire:
Enregistrer un commentaire