There is a certain carnival game that is played this way the player rolls one 6 sided
Fantastic news! We've Found the answer you've been seeking!
Question:
There is a certain carnival game that is played this way
the player rolls one 6 sided die
the player rolls one 20 sided die
the player rolls one 8 sided die
the player rolls one 4 sided die
the player rolls one 12 sided die
The player wins if the total of the 5 die is greater than 35 or less than 20.
Write a program that simulates this game being played 100 times and prints to the screen the number of times a player wins.
Your program must include a method: int dieRoll(int x) that returns a random number between 1 and x (inclusive), you are to use this method in your program.
Related Book For
Introduction to Probability
ISBN: 978-0716771098
1st edition
Authors: Mark Daniel Ward, Ellen Gundlach
Posted Date: