C language programming: • If your cards total 17 or higher, always stand regardless of what the dealer is showing in his face-up card. • If your cards total 11 or lower, always hit. • If your cards add up to 13 to 16 (inclusive), hit if the dealer is showing 7 or higher, otherwise stand. • If your cards add up to 12, hit unless the dealer is showing 4 to 6 (inclusive). In that case, stand. The sample runs of the program should look like this: Here's some advice for blackjack. Tell me which card the dealer is showing. Enter 2-9, 10 (Jack, Queen, King) or 11 (Ace): 7 What is the combined total of your hand? 12 You should: Hit Here's some advice for blackjack. Tell me which card the dealer is showing. Enter 2-9, 10 (Jack, Queen, King) or 11 (Ace): 5 What is the combined total of your hand? 12 You should: Stand
C language
• If your cards total 17 or higher, always stand regardless of what the dealer is showing in his face-up card.
• If your cards total 11 or lower, always hit.
• If your cards add up to 13 to 16 (inclusive), hit if the dealer is showing 7 or higher, otherwise stand.
• If your cards add up to 12, hit unless the dealer is showing 4 to 6 (inclusive). In that case, stand.
The sample runs of the program should look like this:
Here's some advice for blackjack.
Tell me which card the dealer is showing.
Enter 2-9, 10 (Jack, Queen, King) or 11 (Ace): 7
What is the combined total of your hand? 12
You should: Hit
Here's some advice for blackjack.
Tell me which card the dealer is showing.
Enter 2-9, 10 (Jack, Queen, King) or 11 (Ace): 5
What is the combined total of your hand? 12
You should: Stand
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images