Program Assignment
Write a program that rolls a set of dice 2500 times and computes:
1- the number of games won and the number of rolls taken before the win, and
2- the number of games lost and the number of rolls taken before the loss.
Use Las Vegas rules for defining wins/losses:
http://en.wikipedia.org/wiki/Craps.
The output should look exactly like this (the numbers will change but the
formatting can not);
Games won or lost after the 20th roll
are displayed as the 21st roll.
752 games won and 629 games lost on roll 1
173 games won and 109 games lost on roll 2
253 games won and 297 games lost on roll 3
...
...
11 games won and 52 games lost on roll 20
3 games won and 22 games lost on roll 21
The chances of winning are 1098 / 2500 = 43.9%
The average game length is 3.47 rolls.
Press any key to continue . . .