#include <iostream>
using namespace std;

int main()
{
	int scores[5];
	int i = 0;
	int sum = 0;
	double ave = 0.0;
	int maxGame = -1;

	for (i = 0; i < 5; i++)
	{
		scores[i] = 0;
	}

	for (i = 0; i < 5; i++)
	{
		cout << "Enter your score #" << i + 1 << ": ";
		cin >> scores[i];
		sum = sum + scores[i];
	}

	ave = sum / 5.0;
	cout << "Your average is " << ave << endl;

	cout << "Enter a score to find: ";
	int score = 0;
	cin >> score;

	// begin loop
	//		look at first position to see if it is the score
	//			if found display the message "FOUND SCORE"
	//		move to next position

	for (i = 4; i >= 0; i--)
	{
		if (scores[i] == score)
		{
			cout << "FOUND SCORE" << endl;
			cout << "The score that I found was " << score << endl;
			break;
		}
		else
		{
			if (i == 0)					// hit the end of the array and didn't find score
			{
				cout << "The score was NOT found" << endl;
			}
		}
	}

	return 0;
}


