model a simple dice game in c using a drand48 generator. game with two dice, a red
Fantastic news! We've Found the answer you've been seeking!
Question:
model a simple dice game in c using a drand48 generator.
game with two dice, a red one and a blue one. six dots on their sides.
you throw the two dice. It will cost you $1.00 for each throw of two dice. (initial value)
If the number of dots on the red dice is greater than the number of dots on the blue dice, you win $2.25.
So you have to pay $1.00 each time you play but you can win $2.25 if the number of dots on the red dice is greater than the number on the blue dice.
Program/game needs to model the game to show if you will win money or lose money with the system. Using drand48() excute the results for 100 throws of the two dice.
Related Book For
Posted Date: