CIS 275 Extra 1

Points: 10 Due Date: End of term
First create a file with a bunch of integers in it, at least 20. They can be one per line. Then create a program that opens this file and reads the integers in and stores them in a vector. Then you should write several functions that operate on the vector. You can use only iterators to loop over the vector, no use of [] in the code.

One will take the vector as an argument and return the average (as an integer) of the numbers in the vector.

Another will return the largest number in the vector and a third will return the smallest.

The last one will take the vector as an argument and using the one that calculates the average, return a count of the number of times the average value appears in the vector. Now, since the average is probably not an exact integer, you should count as matching any number that is 1 greater or 1 less than the average. So if the average is 13; 12,13,14 would match.

Lastly, you should have a function that prints the vector. Remember, iterators only.

If you have questions, just ask.