Question: Please write code in C++ language. Add comment statements Write preconditions and post conditions for each function. This is for a begginers class so please

 Please write code in C++ language. Add comment statements Write preconditions
and post conditions for each function. This is for a begginers class
so please no advanced codes. :) TIA! 9. Write a program that
Please write code in C++ language.
Add comment statements
Write preconditions and post conditions for each function.
This is for a begginers class so please no advanced codes. :) TIA!

9. Write a program that plays a simplified dice version of blackjack. Instead of selecting from a deck of cards, a 14-sided die is rolled to represent a card. The rules of the game for one round, as played against the house, are as follows: 1. A roll randomly selects from the values 2-10 or Jack, Queen, King, or Ace. An Ace always has the value of 11. Jack, Queen, and King all have the value of 10. In other words, with equal probability, a roll selects one of 2,3,4,5,6,7,8,9,10,10,10,10,11. 2. The human player enters a wager. The wager must be positive and must 3. The player is given two rolls. The house, played by the computer, is 4. If the total of the rolls is 22 or greater than the player "busts", loses the 5. If the total of the rolls is 21 or less then the player has the option to not exceed the amount of money possessed by the player. given one roll. The player is shown the value of the house's roll. wager, and the round is over. "hit" or "stand". If the player opts to "hit then the player is given an other roll. Return to step 4. If the player opts to "stand" then continue to step 6

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!