Objestive is to read in vales from a file (SSN, Number of courses, grades in each) then output to a file with SSN and GPA)
Sample input from file
365-67-4454
5
83 75 67 93
95 89 88 90
78 86 95 88
98 95 86 91
79 84 89 95
The code I am wrestling with:
char ssn[11];
int homework;
int quiz;
int midterm;
int final;
int courses;
int grade;
double gpa;
int i;
int j;
while (! inf.eof() )
{
inf.read(ssn, 11);
inf>>courses;
inf.read(courses, 10);
{
for (i=0; i<courses; i++)
{
int grades[4];
for (j=0; j<4; j++);
inf.read(&grades[j]);
}
}
}