Answered step by step
Verified Expert Solution
Question
1 Approved Answer
solution for c++ Create the C++ program based on the following specifications: 1. Create a program that will simulate the card game of 21 .
solution for c++
Create the C++ program based on the following specifications: 1. Create a program that will simulate the card game of 21 . a. The program will generate random numbers from 1 to 21 to represent the computers move. b. The program will generate random numbers for 1 to 11 to represent the users move. c. The program will then prompt the user if he or she wants to add another card. d. If the user decides to have another card, the program will again generate random numbers from 1 to 11 . The user can add more cards as he wants but if he goes over than 21 , he will automatically lose. e. The number the user got from the first card and the number the user got from the other cards he or she requested will be added and will represent the user's final move. f. If the user got a higher card number compared to what the computer has the user wins otherwise the computer wins g. If the user got a number that is more than 21 , he automatically loses. h. The program will prompt the user again if he or she wants to play if the user says no, the program will end. i. If the final card number of the user is the same as the computer, a message that says it is a tie will be displayed. j. There should be at least one void function in 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