Programming
Assignment 15
Your history professor has just learned
that you are a computer whiz. She has
made you an offer you cannot refuse! If
you will write a program to do simple analysis on the scores on the final exam,
she will allow you not to take it. You,
of course, cheerfully agree.
Your program must work for any size class
up to 50 students. It should do the
following things:
1. Read in the scores on the final exam
using an end of file loop. Use a
function to read the scores that also returns the number of scores read.
2. Use a function to calculate the class
average.
3. Use a function to calculate the class
maximum score.
4. Use a function to calculate the class
minimum score.
5. Use a function to count the number of
scores that are above average.
6. Use a function to print class average,
class maximum, class minimum, and number above average. Print class average to one decimal
digit.
70 90 80 85 65 55 100 70 40 77 66 55 44
Class Average = 69.0
Class Maximum = 100
Class Minimum = 40
Number Above Average = 7
int ReadScores(int score[]);
float Average(int score[], int number);
int Max(int score[], int number);
int Min(int score[], int number);
int AboveAverage(int score[], int number,
float average);
void Printout(float average, int max, int
min, int numaboveavg);