// Ch. 14 Demo 2


#include <iostream.h>
#include "M:\C++ Programming\AP classes\apvector.h"

int main()
{
	apvector <int> scores;
	int i = 0;
	int sum = 0;
	double average = 0.0;
	int num = 0;

	cout << "How many test scores? ";
	cin >> num;
	scores.resize(num);

	for (i = 0; i < num; i++)
	{
		cin >> scores[i];
		sum += scores[i];
	}

	average = double (sum) / num;

	cout << "The average is " << average << endl;

	return 0;
}