Section 9.33 Write a function for the following

Modify the craps program in Fig. 9.6 to allow wagering. Initialize variable bankBalance to 1000 dollars. Prompt the player to enter a wager. Check that the wager is less than or equal to bankBalance and, if not, have the user reenter wager until a valid wager is entered. After a valid wager is entered, run one game of craps. If the player wins, increase bankBalance by wager, and print the new bankBalance. If the player loses, decrease bankBalance by wager, print the new bankBalance, check whether bankBalance has become zero and, if so, print the message Sorry. You busted! As the game progresses, print various messages to create some chatter, such as Oh, you're going for broke, huh? or Aw c'mon, take a chance! or You're up big. Now's the time to cash in your chips!. Implement the chatter as a separate function that randomly chooses the string to display.



Craps
Die 1
Die 2
Sum
Point
Click the Roll Dice button to play

Balance

$1000.00

Current Wager

$0.00