Question: Write a program that will allow you to input two scores for each of the 16 games one for your favorite team and one for

Write a program that will allow you to input two scores for each of the 16 games one for your favorite team and one for their opponent. To do this create a loop (use correct type) to read from the keyboard, the scores for each game. Each game will have two scores, your teams score and the opposing teams score. The purpose of the program will be to determine if your team wins at least 10 games or more, which probably will insure they reach the playoffs. I don't know how to make the two score to add up. In C++

// HW-1 Super Bowl Bound

// Description: determine if your team wins at 10 games or more.

#include "stdafx.h"

#include

#include

#include

#include

#include

using namespace std;

float displayWin(int win, int Score1, int Score2 );

float displayLose(int lose, int Score1, int Score2);

int main()

{

float Score1, Score2, average, count, sum1, sum2, win, lose;

count = 0;

sum1 = 0;

sum2 = 0;

while (average = sum1 + sum2 / count)

{

cout << "First game of the season!";

cout << endl;

cout << "Enter the score of the Balitmore Ravnes: ";

cin >> Score1;

cout << "Enter the score of the oppoennt Team: ";

cin >> Score2;

for (sum1 = Score1;

Score1 <= sum1;

sum1 += Score1)

{

cout << sum1 ;

count++;

}

for (sum2 = Score2;

Score2 <= sum2;

sum2 += Score2)

{

cout << sum2 ;

count++;

}

cout << endl;

cout << "Enter the score of the next game: ";

cin >> Score1;

cout << "Enter the score of the oppoennt Team: ";

cin >> Score2;

cout << endl;

}

cout << "Team Balitmore Ravens: Final Record";

cout << endl << endl;

cout << "Games Won: " << count << true << endl;

cout << "Games Lost: " << count << false << endl;

cout << endl;

cout << endl;

cout << "Winning Percentage: " << average << endl;

cin.get();

cin.get();

return EXIT_SUCCESS;

}

float displayWin(int win, int Score1, int Score2)

{

win = 1;

if (Score1 > Score2)

return true;

}

float displayLose(int lose, int Score1, int Score2)

{

lose = 0;

if (Score1 < Score2)

return false;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!