Question: C programming (Craps Game Modification) Modify the craps program of 5.14 to allow wagering. Package as a function the portion of the program that runs

C programming (Craps Game Modification) Modify the craps program of 5.14 to allow wagering. Package as a function the portion of the program that runs one game of craps. Initialize variable bankBalance to 1000 dollars. Prompt the player to enter a wager. Use a while loop to check that wager is less than or equal to bankBalance, and if not, prompt the user to reenter wager until a valid wager is entered. After a correct wager is entered. After a correct wager is entered, run one game of craps. If the player wins, increase 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 message to create some "chatter" such as, "Oh, you were going for broke, huh? or "Aw cmon, take a change!" or "You're up big, Now's the time to cash in your chips!"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!