subject

In this game of volleyball, two teams compete to be the first team to score 21 points. However, to win the game, a team must also lead by two points. For example, if team A is tied with team B (20-20) and then scores, they will only be ahead by one point (21-20). Then, if team B scores a point, the game will be tied again (21-21). Then, if either team can score two consecutive points, they will win. Write a program that reads data about volleyball matches from standard input and then determines the outcome of the game. If the input word is "A" it means that team A scored a point. If the input word is "B" it means that team B scored a point. If the input word is "end" it means that the game ended. Calculate the scores and announce the team that won or that the game was a draw. Display the game result in this format: Team A won! (21-14) Game ended as a draw. (21-21) #include using namespace std;
/* * Determines the outcome of a volleyball game.
*/ int main() {
return 0; }
input case 1:

A A A A A A A A A A A A A
B
A
B B B B B B B B B B B B B B B B B B
A A A A A A
B
A
B B
A A
end Team A won! (24-22)
case 2:

A A A A A A A A A A A A A A A A
B B B B B B B B B B
A A A A A A A A A
B B B B B B B B B B B B B B B B
A A A A A A A A team A won (21-10)
first to reach 21 if draw first to score 2 more than the other wins.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 08:50
Write a program that will compute the volume of ice cream served in a cone. as you can see in the diagram below, the ice cream is served as a hemisphere of frozen deliciousness on top of a cone, which is also packed with frozen deliciousness. thus, the total volume of ice cream sold is the volume of the hemisphere plus the volume of the cone. the example shows an ice cream cone in which the hemisphere and cone have a radius of 10 inches and the cone has a height of 15 inches. your program must instead prompt for these two values, which are taken from the keyboard as integers: • the hemisphere/cone radius in inches, and
Answers: 3
question
Computers and Technology, 24.06.2019 10:30
You're programming an infinite loop. what must you include in your code to prevent crashes? in roblox
Answers: 2
question
Computers and Technology, 24.06.2019 16:30
Jenny needs to record the names of 30 students, write down the subjects they studied, and note their grades in each subject after the midsemester exams and the end-of-semester exams. she divides the midsemester and end-of-semester information into two separate worksheets, sheet 1 and sheet 2. how will she rename the two worksheets?
Answers: 2
question
Computers and Technology, 25.06.2019 08:10
Which of the following is a difference between the systems development life cycle (sdlc) and extreme programming (xp)? the sdlc model has a separate planning and analysis phase, whereas xp combines both the phases into one phase.in the sdlc model, changes cannot be made to a system once it is delivered to the user, whereas the xp method delivers the system to the users and then make changes suggested by the user.the sdlc model develops an entire system at once, whereas xp uses incremental steps to improve an information system's qualitydevelopers following the sdlc model cannot go on to the next phase until the current phase is finished, whereas in xp, developers can move to any phase from the current phase.
Answers: 1
You know the right answer?
In this game of volleyball, two teams compete to be the first team to score 21 points. However, to w...
Questions
question
Mathematics, 05.01.2020 14:31
question
Social Studies, 05.01.2020 14:31
question
Mathematics, 05.01.2020 14:31
Questions on the website: 13722361