
please wait
Write a program to simulate the casino game "craps". It should execute 100000000 times so that you can compute the probability(%) of the "player" winning and the "house" winning. The rules are: Player rolls two dice. When the sum is 7 or 11 on first throw, player wins. When the sum is 2, 3, or 12 on first throw, "house" wins. When the sum is 4,5,6,8,9, or 10 on first throw, that sum becomes the player's "point". Now, to win the player must continue rolling the dice until he makes "point"; however should he roll a 7 then the "house" wins. That concludes the game. |
|
|
if (dicesum == 4 || 5 || 6 || 8 || 9 || 10)
|
|
|
|