Reading in scores from a file

I am having trouble figuring out how to read in scores from a file. The first line of the file has three integers, each indicating the number of quiz grades, homework grades, and exam grades.
The subsequent lines have the last name, first name, and the grades for each assignment.
What I am having trouble with is figuring out how to sum the number (x) of quiz grades, then move on to sum the number (y) of the homework grades, etc...

Please Help!!!
closed account (49iURXSz)
How are you storing your grade information in your program? Will you show me some source code so I can follow along?
Topic archived. No new replies allowed.