grades average
I have to calculate the average grade of each student at each subject. The grades, students and subjects are read from a file. name file look like this: 2, student1 7, student2 1, student3 .... subject file : 5, math 3, physics 8, geography ... grades file: // date, number of grades // student code, subject code, grade 18.06.2020, 3 2, 3, 10 1, 8, 7 7, 5, 9 19.06.2020, 2 8, 3, 8 3, 8, 6 .... I stored these values in structs: struct Subject { char subjectName[N]; int code; }; struct Students { char studentName[N]; int code; }; struct Grades { int grade[N][3]; char date[N]; int number_of_grades; // number of grades in a day }; struct Date { int number_of_days; // total number of days int number_of_students; // total number of students int number_of_subjects; // total number of subjects }data; Now I think I need to store these values depending on the students and subjects code and after that calculate the average. Can you give me an advice on how can i solve these?