I am trying to get this gradebook to give me the average/low/high score for three assignments from three different students which i have to get their first/last name, their rank, and major. Everything is working properly except when I try to find the average/low/high score from each assignment it is only doing it for the third assignment and i cant figure out whats wrong with it
You are muddling the number of students (3) with the number of assignments (also, unfortunately, 3).
If you look at your loop you put something into the same array element (intDataArray[count]) three times. So, at the end, it will always have the last one ... which is just the mark for assignment 3.
Each student has three assignment grades, which would yield a total of nine integers / array elements. You only have an array of three integers to represent all the grades for all students.
You will need either three arrays with three elements each, a multidimensional array or an array of nine elements.
So (xismn) your saying that I should store the assignment scores for each assignmet number into a different array ex assignment 1 goes to say intDataArray, assignment 2 into intDataArrayx and the third assignment into intDataArrayz ?
"should" - up to you: this is xismn's first suggestion.
His second suggestion (multidimensional array) might ultimately be better and more flexible - in the future, there might be a different number of students and a different number of assignments.
Actually, if all you are doing is finding max/min/average then there is no point in storing the individual data items anyway.