2 Attachment(s)
Grades calculating program help please!
Hello everyone,
I am a programming beginner taking intermediate C. Our teacher assigned a program for us to write and I've been going crazy trying to figure out how to put it together. I attached the two things that we need for the assignment and the instructions.
I did get one of the functions to work. I'm able to open the file that I want successfully. My issue is that I have no logical idea about how to go about scanning the information from the file in. I mean, the first number is the student ID, and it repeats every 6 lines and that needs to be scanned into an array. I will probably figure out how to do that part. However, how to scan the actual data and calculate it, is killing me.... The second line has 9 homework scores for example, so does this mean that I have to make int HW1, int HW2, int HW3.... int HW9?! and then add those two up and divide to get the average? I seems a little insane and like there should be an easier way... And how would I put the results of everything back? please help me out! (If you could try to keep the explanation as simple as possible, I would really appreciate it. I tend to get lost with all of the fancy terminology and such)
Thank you for your time!