A text file, grades.txt, contains data pertaining to student grades. Each line consists of:
student number,course mark1, course mark2, course mark3, course mark4
The last line contains a student number 0 to indicate the end of the data.
Write a C program to print a grade report, as outlined below, to the file report.txt.
For each student, output the student number, the marks obtained in each course, followed by the final mark of the student(average of all the marks) and their grades (A,B,C,D or F). At the end of the report output the number of students in the file, the average final mark, and the student with the highest final mark.
Grades are to be calculates as follows:
A: 70 and over
B: 60-70(exclusive)
C: 50-60(exclusive)
D: 40-50(exclusive)
F: less than 40
Anny ideas anyone???