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
Write keyboard shortcut to insert footnote and endnote​
loris [4]

Answer:

Alt + Ctrl + F to insert a footnote.

Alt + Ctrl + D to insert an endnote.

Correct me, if I am wrong :)

Have a great day!

Thanks!

5 0
2 years ago
When a web page author includes meta keywords, like sex, that have little to do with the information on the page, the author is
OLga [1]
This practice is known as "ClickBait".
8 0
3 years ago
Hoda needs to create a chart that is associated with an Excel spreadsheet. She needs to ensure that if the data in the spreadshe
omeli [17]

Answer:

Link the chart.

Explanation:

Microsoft Excel is a software application or program designed and developed by Microsoft Inc., for analyzing and visualizing spreadsheet documents.

A spreadsheet can be defined as a file or document which comprises of cells in a tabulated format (rows and columns) typically used for formatting, arranging, analyzing, storing, calculating and sorting data on computer systems.

In this scenario, Hoda needs to create a chart that is associated with an Excel spreadsheet. Also, she wants the data in the spreadsheet to change as soon as the chart in her presentation is updated. Thus, the option she must choose is to link the chart with the spreadsheet.

In the source spreadsheet, she should select a chart and the cell where she wants the hyperlink to appear. Then, she should create a hyperlink that links to the spreadsheet.

8 0
3 years ago
Which of the following that can be use read cookies in PHP?
iris [78.8K]

Answer:

a. $_COOKIE

Explanation:

$_COOKIE represents an associative array of Cookie name and value in PHP. For example in the code below we use the $_COOKIE construct to read the value of a cookie called 'testcookie' provided it has already been set.

<html>

<body>

<?php

if(!isset($_COOKIE["testcookie"])) {

   echo "Cookie 'testcookie' is not defined!";

} else {

   echo "Value of 'testcookie' is: " . $_COOKIE["testcookie"];

}

?>

</body>

</html>

8 0
3 years ago
A _____ movement tries to improve a part of society, usually through legal methods.
arlik [135]

Answer:

Don’t know lol but look it up on g00gle and she will have the answr

Explanation:

3 0
2 years ago
Read 2 more answers
Other questions:
  • Stefan is finalizing his presentation by adding media files and preparing it for distribution. Stefan knows that saving a presen
    13·1 answer
  • A user makes a request to implement a patch management service for a company. As part of the requisition the user needs to provi
    7·1 answer
  • ASAP HELP
    13·1 answer
  • What is the first step to apply the line and page breaks options to groups of paragraphs in a Word document?
    10·2 answers
  • By convention only, either the first usable address or the last usable address in a network is assigned to the router (gateway)
    11·1 answer
  • How many different textile items would you find at a festival? (please list 5 items)
    7·1 answer
  • Your personal opinion about what a "successful" console in the future will need to include to sell well. How have the changes in
    12·1 answer
  • How does the use of blocking affect the external sorting algorithm, and how does it change the cost formula
    5·1 answer
  • Which of the following are exclusively associated with copyright protection
    5·2 answers
  • Determine which program you would recommend each of the customers should use. There are multiple correct answers so please inclu
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!