Here is the assignement: You will write a program to stimulate the game of craps
ID: 3620490 • Letter: H
Question
Here is the assignement:You will write a program to stimulate the game of craps (a dice game) by first presenting the user with a menu with the following choices: 1. play the game, 2.Displays winnings, 3. reset winnings and 4. quit. Since the user has only 4 choices, you must make sure that any other entries are flagged as an error.
If the user chooses the 1st option, he will be presented with a screen that prompts him the letter R to roll the dice. When this is done you will display the following e.g.: Die 1 = 4, Die 2 = 6. If the first and the the total is either 7 or 11, the player wins. On the other hand, if the total is either 2,3 or 12 the player loses. Any other value is considered the player's point and he continues to roll until either the point is made which means the total appears on the dice a second time he rolls a 7 which is an immediate loss. A pretend bet of $100 is made for every game and if the player wins , the $100 is added to his winnings. However, if he loses, the $100 is deducted from the total winnings. After each game finishes the player must be asked if he wishes to continue. A "yes" allows this to happen, a "no" answer returns the player to the menu, reset winnings to 0 and press a key to return to the menu or quit (yes/no prompt required). One additional point, while a player may quit at any time, you are to force this quit if he has a negative balance of $1000. At this point, you will display a terminal message such as "GAME OVER- YOU HAVE NO ADDITIONAL FUNDS!"