
In the game of High-Low-Seven a person places a bet of High, Low or Seven then rolls two dice. If a bet of High is placed a roll greater than 7 happens they are a winner. If a bet of Low is placed and a roll less than 7 happens then are a winner. If they bet Seven and roll a 7 they are a winner. Any other combination of bets and rolls they lose.
1)Write a program to simulate the game of High-Low-Seven. Ask for the Bet (a char) 'H' or 'L' or 'S'. Use toupper from the ctype.h include file to convert the bet to uppercase. (ex - bet=toupper(bet)). Roll the dice..get the total roll and use if-else statements to determine a win or a lose.
2) Make the game play multiple times.
3) Add in an initial bank of $500..ask for a monetary bet...play the game..add or subtract depending on the outcome.
The rules for Craps are as follows(two dice are used):
First Roll
- Throw a 7 - Win - Game Over
- Throw a 2,3 or 12 - Lose - Game Over
- Any other value - that becomes your POINT and you roll again until.......
Second and all other rolls...Continue rolling until you get either your POINT or a 7. If you get a 7 before your POINT you lose. If you get your POINT before a 7..you WIN!!!