subject
Computers and Technology, 30.10.2020 05:40 3mina

Please help me I really need this code. Ninety-Nine is a two-player card game played with a deck of 40-cards. The cards are labeled 0 – 9. To start, each player gets 3 cards and the remaining cards are placed face
down on the table (the pile). In an actual game, the point total is set to zero but for this program, an initial point total will be given. Cards are played in the order they are added to a player’s hand. Each player in turn puts down a card and changes the point total according to the point value of his card and then selects a card from the top of the pile. Each card adds its face value in points (e. g. a 5 is worth five points) to the point total except for certain cards that have special values or meanings:
1. A 9 is a pass (and does not change point total)
2. A 4 subtracts 10 points from the total
3. A 0 adds either 1 or 11 to the point total. The 11 is played first as long as it does not put
the point total over 99.
If a player plays a card that puts the total over 99, that player loses the game.
GET THE USER TO INPUT THE CARDS AND TOTAL POINT VALUE.
INPUT:

An input line will contain 11 integers. The first integer gives the initial point total. The next 3 integers will represent the 3 cards dealt to the player. The remaining integers will be, in order, the card picked by the player and the card played by the dealer.

OUTPUT:

Print the point total when the game ends and who won (player or dealer).

SAMPLE INPUT OUTPUT

87, 5, 8, 9, 7, 4, 6, 3, 9, 0, 2 101,dealer

78, 2, 4, 8, 3, 8, 5, 0, 6, 9, 8 100,dealer

95, 9, 0, 9, 0, 1, 0, 1, 0, 2, 5 100, player

65, 0, 8, 0, 7, 0, 6, 0, 5, 1, 4 105, dealer

Manual Sample run:

87, 5, 8, 9, 7, 4, 6, 3, 9, 0, 2

P P P P D P D P D P

Total = 87
Players turn 5 Total 92
Dealers turn 4 Total 82
Players turn 8 Total 90
Dealers turn 3 total 93
Players turn 9 pass total 93
Dealers turn 0 Total 94
Players turn 7 Total 101
Total 101, Dealer is the winner as the card value exceeded when player was dealing the card

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
Which of the statements below is true? the formatting, standard, and drawing commands are unavailable. the formatting, standard, and drawing commands have been used. the formatting, standard, and drawing toolbars are displayed. the formatting, standard, and drawing toolbars are hidden.
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
Respond to the following in three to five sentences. select the workplace skill, habit, or attitude described in this chapter that you believe is most important for being a successful employee.
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
You have a small company and want to keep your costs low, but it is important your employees share data. which network would provide you with the most economical solution?
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
You know the right answer?
Please help me I really need this code. Ninety-Nine is a two-player card game played with a deck of...
Questions
question
Mathematics, 13.06.2020 19:57
Questions on the website: 13722360