Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The game should begin by randomly dealing 2 cards to the user s hand, and then calculate and display the total. Next the program should
The game should begin by randomly dealing cards to the users hand, and then calculate and
display the total.
Next the program should display a prompt, asking the user if heshe wants a Hit or to Stand.
If the user selects to Hit the game should randomly deal a new card to the users hand, and then
calculate and display the new total.
If the total is greater than then the user Busts, the house wins, and a message
indicating these results is displayed.
If the total is less than repeat the HitStand Prompt to the user. Continue this process
until the user elects to Stand or Busts.
If the user selects to Stand, the game then randomly deals two cards to the house, and then
calculates those total points.
The dealer must continue to Hit as long as the total of the House had is under display
the results after each Hit
The dealer must Stand once the House hand reaches or higher. Once
If the user has not already Busted, compare the Users Hand to the House Hand and determine
and display the results. The player closes to without going over wins.
Once a final game result has been displayed, prompt the user to see if heshe would like to play
again. If the user selects to play again, start the program from the beginning, otherwise display a
farewell message and terminate the program.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started