Answer:
if(score1 > score2)
{
cout<<"player1 wins"<<endl;
player1Wins++;
player2Losses++;
}
elseif(score1<score2)
{
cout<<"player2 wins"<<endl;
player2Wins++;
player1Losses++;
}
else
{
cout<<"tie"<<endl;
tieCount++;
}
Step-by-step explanation:
The above written statement is in C++.I have used if-elseif ladder to meet the requirements for the question and the variables are increased according to the win and loss of the respective players and also for the case of tie.I have used post increment operator to increase the count.