1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zhuklara [117]
4 years ago
7

Write a statement that compares the values of score1 and score2 and takes the following actions. When score1 exceeds score2, the

message "player1 wins" is printed to standard out. When score2 exceeds score1, the message "player2 wins" is printed to standard out. In each case, the variables player1Wins, player1Losses, player2Wins, and player2Losses, are incremented when appropriate. Finally, in the event of a tie, the message "tie" is printed and the variable tieCount is incremented.
Computers and Technology
1 answer:
Citrus2011 [14]4 years ago
6 0

Answer:

Following are the statement in the C++ Programming Language.

//check condition that score1 is greater than score2

if (score1 > score2)

{//print the message  and brake line

cout << "player1 wins" << endl;

//increment in the variable by 1

++player1Wins;

//increment in the variable by 1

++player2Losses;

}

//check condition when score2 is greater than score1

else if (score2 > score1)

{ //print the message  and brake line

cout << "player2 wins" << endl;

//increment in the variable by 1

++player2Wins;

//increment in the variable by 1

++player1Losses;

}

//otherwise

else

{ //print the message  and brake line

cout << "tie" << endl;

//increment in the variable by 1

++tieCount;

}

Explanation:

<u>Following are the description of the program</u>.

  • In the statement, we check that the variable 'score1' is greater than 'score2' then, print message and brake line, then increment in the variables by 1 that is 'player1Wins' and 'player2Losses'.
  • Again check that the variable 'score2' is greater than 'score1' then, print message and brake line, then increment in the variables by 1 that is 'player2Wins' and 'player1Losses'.
  • Otherwise, print the following message and break line then, increment in the variable 'tieCount'
You might be interested in
The number of pixels displayed on the screen is known as ​
puteri [66]

Answer: Resolution

Explanation: The total number of pixels that can be displayed on the screen at a time is called the resolution of the screen. This resolution is normally described in the pair of numbers, such as 2560 x 1440. This means, the computer screen is 2560 pixels wide and 1440 pixels tall.

4 0
3 years ago
What is the Digital Living Network Alliance ?
Sedaia [141]

The digital living alliance network is a set of guidelines to share digital media among wired and wireless multimedia devices.

<h3>What is the digital living alliance network?</h3>

The Digital Living Network Alliance is a trade association that establishes rules and practices for home network equipment, incorporating computers, smartphones, etc.

It is a set of guidelines to share digital media among wired and wireless multimedia devices.

Learn more about digital on:

brainly.com/question/23749502

#SPJ12

8 0
2 years ago
Read 2 more answers
APPLY
tatiyna

Answer:

i<6 is the "end guard". This means that the loop continues while this is true, and ends when this is false.

i++ is the "continuation", it is the operation executed when the loop continues. i++ increases the value of i by one.

4 0
3 years ago
Can someone help me?
alina1380 [7]

*☆*――*☆*――*☆*――*☆*――*☆*――*☆*――*☆*――*☆**☆*――*☆*――*☆*――*☆

Answer: Try restarting the computer

I hope this helped!

<!> Brainliest is appreciated! <!>

- Zack Slocum

*☆*――*☆*――*☆*――*☆*――*☆*――*☆*――*☆*――*☆**☆*――*☆*――*☆*――*☆

6 0
3 years ago
Read 2 more answers
Jordan says she cant access files on the server any more. No other user has reported this problem and she can PING the server fr
kramer

Answer:

Lan cable was disconnected or unplugged from jordan's PC

Explanation:

According to the scenario, no user other than Jordan has reported the problem which means that there was no issue in the network or server.

As IP address ping of 127.0.0.1 was successful means that the configuration of the IP address was also correct and the DHCP server was working correctly.

After all assessment one of the main cause could be the disconnection of the LAN cable from Jordan's computer.

6 0
3 years ago
Other questions:
  • A. True
    6·1 answer
  • A news website uses 32-bit integers to count the number of times an article has been viewed. The website is becoming more popula
    10·1 answer
  • What is a device driver?
    9·2 answers
  • What is the name of a popular high-level computer programming and scripting language that is the name of a snake?
    10·1 answer
  • If there is a slow internet connection or limited access to certain sites it is often better to _________ a video file before st
    9·2 answers
  • FIGURE A-2—Use the information in this chart to answer Question 2.
    11·1 answer
  • Create a static method called fillArray, which takes an integer array as an input parameter, along with an integer initial value
    12·1 answer
  • Define Agricultural Era
    14·2 answers
  • What is a fixed expense<br> everfi
    6·1 answer
  • True or false altering iso will affect the area of focus in a photo
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!