Menu

(Solved) : Game 21 C Assignment Write Program Lets User Play Com Puter Variation Popular Blackjack Ca Q35630967 . . .

A Game of 21 C++

For this assignment, you will write a program that lets the userplay against the com- puter in a variation of the popular blackjackcard game. In this variation of the game,

two six-sided dice are used instead of cards. The dice arerolled, and the player tries to beat the computer’s hidden totalwithout going over 21. Here are some suggestions for the game’sdesign:

  • Each round of the game is performed as an iteration of a loopthat repeats as long as the player agrees to roll the dice, and theplayer’s total does not exceed 21. 

  • At the beginning of each round, the program will ask the userswhether they want to roll the dice to accumulate points. 

  • During each round, the program simulates the rolling of twosix-sided dice. It rolls the dice first for the computer, and thenit asks the user if he or she wants to roll. (Use the Die classthat was demonstrated in this chapter to simulate the dice). 

  • The loop keeps a running total of both the computer and theuser’s points. 

  • The computer’s total should remain hidden until the loop hasfinished. 

  • After the loop has finished, the computer’s total is revealed,and the player with the 
most points without going over 21 wins.


Expert Answer


Answer to Game 21 C Assignment Write Program Lets User Play Com Puter Variation Popular Blackjack Ca Q35630967 . . .

OR