(Solved):Modify the craps program to allow wagering. Initialize variable bankBalance to 1000 dollars….

 

Question

Modify the craps program to allow wagering.

Initialize variable bankBalance to 1000 dollars.

Prompt the player to enter a wager. Check whether the wager is less than or equal to bankBalance and, if not, have the user reenter the 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

Scroll to top