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 .

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 .

LANGUAGE: C++

CHALLENGE:

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.

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days – Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level