I want to write a java program where there 50% chance for event a to occur, 35% chance for event b to occur and 15% chance for event c to occur and finally print the event which took place. Thanks.
I tried using math.random but it ended up being too complicated for me to understand.
Aucun commentaire:
Enregistrer un commentaire