I'm trying to create simple slot machine with three slots. Each slot will generate a random number between 0 and 9 inclusive. The user will start with 1,000 coins and can wager any number of coins per slot pull. The payouts are: if 2 slots equal each other the user wins 10x the wager, if 3 slots equal each other the user wins 100x the wager, and if 0 slots equal the user loses the wagers. I want the output to generally look like this:
Slot Machine
You have 1000 coins.
Press 0 to exit, any other number to play that many coins per spin
1000
Spin: 4 6 6
You won 10000 coins! You now have 11000 coins.
Press 0 to exit, any other number to play that many coins per spin
11000
Spin: 4 4 1
You won 110000 coins! You now have 121000 coins.
Press 0 to exit, any other number to play that many coins per spin
121000
Spin: 5 1 9
You lost 121000 coins! You now have 0 coins.
Press 0 to exit, any other number to play that many coins per spin
10
You ran out of coins. Thanks for playing.
I'm not very familiar with programming and a few of the seniors I look after would enjoy this for a little fun with them learning how to use a computer. Thanks.