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]
3 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]3 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
Can anyone help my please
Makovka662 [10]

order: soil, plant seeds, water, seedling, corn plant

4 0
1 year ago
Read 2 more answers
Explain demand paging with a proper example
julia-pushkina [17]
<h2><em><u>Demand</u></em><em><u> </u></em><em><u>paging</u></em><em><u> </u></em><em><u>:</u></em></h2>

<h3><em>In computer operating systems, demand paging (as opposed to anticipatory paging) is a method of virtual memory management. In a system that uses demand paging, the operating system copies a disk page into physical memory only if an attempt is made to access it and that page is not already in memory (i.e., if a page fault occurs). It follows that a process begins execution with none of its pages in physical memory, and many page faults will occur until most of a process's working set of pages are located in physical memory. This is an example of a lazy loading technique.</em></h3>

<h3 />

6 0
3 years ago
Allison is preparing to modify a network access control list and add three firewall rules to her private cloud HR systems. She i
Yakvenalex [24]

C. Change management

Allison is preparing to modify a network access control list and add three firewall rules to her private cloud HR systems by following the Change management process.

What exactly is change management?

Change management is the process of developing and implementing effective change strategies in businesses and organizations.

Examining the reasons for change, implementing changes, and assisting people in adapting to these changes are all part of it. This could include reorganizing the workforce, implementing new technology, lowering costs, increasing profits, or a combination of these to achieve a specific goal.

To know more about Change management, visit: brainly.com/question/28096717

#SPJ4

4 0
10 months ago
A technician who is managing a secure B2B connection noticed the connection broke last night. All networking equipment and media
pashok25 [27]

Answer:

<u>d. CRL</u>

<u>e. OCSP</u>

Explanation:

Note, the term PKI stands for Public Key Infrastructure.

Among all the PKI components, the CRL (CERTIFICATE REVOCATION LISTS), which contains a list of issued certificates that were later revoked by a given Certification Authority, and the PFX format used for storing server certificates should be examined by the technician use to validate his assumption.

7 0
3 years ago
Which of the following are true about Public Key Encryption?
BabaBlast [244]
A is the correct answer
5 0
2 years ago
Other questions:
  • Blender questions
    8·1 answer
  • How much space should be allotted to park your vehicle parallel to the curb?
    5·1 answer
  • you are concerned with security at your company and want to implement a technology that requires no configuring on the users sid
    15·1 answer
  • The _____ search algorithm searches a list for a given item, starting with the first element and continues to compare the item w
    12·1 answer
  • Write a program that calculates the average rainfall for three months. The program should ask the user to enter the name of each
    5·1 answer
  • The use of computers in education is referred to as computer assisted instruction (CAI). Write a program that will help an eleme
    8·1 answer
  • Brake fluid should be checked __________.
    8·2 answers
  • Which Artificial Intelligence (AI) term is used to describe extracting information from unstructured text using algorithms?
    8·1 answer
  • 1. Which one of the following is true about screening interviews?
    7·1 answer
  • Which Backstage view feature helps you to specifically remove customized information from a document? Protect Document Feedback
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!