To play, the gambler first places a wager, W. The gambler then picks any number from 1-6. Let n represent the gambler's number. Next, the gambler rolls three six-sided dice. If none of the rolls equals n then the gambler loses W. If one of the rolls equals n then the gambler wins wager W back (even money, 1-1). If two of the rolls equals n then the gambler wins twice the wager W (2-1). If all three of the rolls equals n then the gambler wins three times W (3-1).
Write a program that implements a C++ version of Chuck-a-luck. It should output appropriate messages so the player knows what has happened. The player should be prompted to input a wager, select a number, and to initiate rolling the dice. The gambler should start with $100. The gambler should be allowed to keep playing until he or she runs out of money (don't allow a wager that is more than the amount of money owned) or the gambler decides to quit playing. For the selected number that should be from 1-6, your program should only allow the gambler to choose a valid number. For example, if 7 or 0 is entered then the gambler should be prompted to enter the number again.