This is my program to input student ids and a group of quiz scores and calculate the average for each student as well as the highest and lowest average of all students. I got my program to run successfully, but when I check it against my test data I run into a problem when two or more students have the same average. My question is how to get my output to display more than one student id?
Here is a sample input:
Stud ID: # of Exams: Scores:
1111 3 20 20 20
1112 2 12 14
1113 4 11 19 13 16
1114 3 20 20 20
This is for a 100 lvl intro to C++ class so I would appreciate any "low skill" help=). The commented out if statements with the variables set to ????????? are where I'm stuck. I appreciate any suggestions or tips.
You variables were not initialized. For example variable totalQuizCount was not initialized and as the result it has an undefined value after statement
totalQuizCount += howManyQuiz;
You need not to consider condition avg == max because it does not influence on the maximum (or minimum) value of averages.