Question: Next, we will be writing a program that interprets pairs of playing cards as a blackjack hand and prints the overall value. Each card can
Next, we will be writing a program that interprets pairs of playing cards as a blackjack hand and prints the overall value. Each card can be only one of the following chars, 'A', 'K', 'Q', 'J', 'T', '9', '8', '7', '6', '5', '4', '3', '2'.
- The values of an 'A' can be 1 or 11,
- the value of 'K', 'Q', and 'J' are each 10,
- the value of 'T' is 10,
- the value of all other cards is number of the card
To get you started, I have provided a partial program that outlines the idea of what you will need to do. Modify this program that takes two cards as chars and prints the overall value of the cards. If an 'A' is one of the cards, choose the appropriate value of 'A' (can be only 1 or 11), so that the total of the hand does not exceed 21. The final few lines of the program print the blackjack style determination of the score of the hand, this is there to guide you through debugging and testing. Be sure to be very thorough!
#includestdafx.h
#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
