Write a code to perform card counting. First you have to evaluate the card whether it is Ace (A), Jack (J), Queen (Q), or King (K). If card is J, Q, and K then points will be 10. If card is Ace then points will be 11. For the rest of the cards points will be the card number e.g. card 3- points will be 3, card 4 – points will be 4 and so on. Now you have to perform card counting to track card number 10, Jack, Queen and King. You have to display “Count has gone up” message if the points is in between 3 and 6. If the points is 10 then you will display “Count has gone down”. a) Draw the flow chart of the above program. Also, write pseudo code of the above program. b) Implement the above code using conditional statements. Also, explain which control structure will be best for the above problem.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.4: A Case Study: Rectangular To Polar Coordinate Conversion
Problem 7E: (Simulation) Write a program to simulate the roll of two dice. If the total of the two dice is 7 or...
icon
Related questions
Question

Q no. 1:
Write a code to perform card counting. First you have to evaluate the card whether it is Ace (A),
Jack (J), Queen (Q), or King (K). If card is J, Q, and K then points will be 10. If card is Ace then
points will be 11. For the rest of the cards points will be the card number e.g. card 3- points will
be 3, card 4 – points will be 4 and so on.
Now you have to perform card counting to track card number 10, Jack, Queen and King. You
have to display “Count has gone up” message if the points is in between 3 and 6. If the points is
10 then you will display “Count has gone down”.
a) Draw the flow chart of the above program. Also, write pseudo code of the above
program.
b) Implement the above code using conditional statements. Also, explain which control
structure will be best for the above problem.

Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning