Write an ANSI C program that calculates the letter grade of students in a class. The input is a file consists of student’s records, every record in a line and terminated by a newline character.
Each line consists of
• Student ID, a string of 8 digits
• Student name in the form “lastname, firstname:” where the last name and the first name are separated by a comma and a single space (no middle initials).
• Final exam mark: an integer out of 100
• Midterm mark: an integer out of 50
• The mark for three quizzes (each out of 10): each is an integer
The course mark is 50% final, 30% midterm and 20% quizzes
For the quizzes, if a student missed a quiz with a legitimate excuse, he gets “-“ (the minus sign) and the weight of this quiz is divided among the 2 other quizzes, a maximum of 1 missed quiz.
The separation between the colon after the first name and the scores, as well as between the scores is one or more spaces.
The maximum length of any line is 100 characters
Your program should read and process each line until it encounters the end of the file.
Score
Letter grade
>=90
A
>= 80 && <90
B
>=70 && <80
C
<=60 && <70
D
<60
F
The output of the program should be



Student ID, name, and a letter grade according to the previous table, there is exactly one space between the ID and the name, and 2 spaces between the colon after the name and the letter grade. Also, each student should be on a separate line.
After that, a single line stating “N students processed” where N is the number of students.
Your program should be able to deal with the following cases:
• If the student ID is not 8 digits, the letter grade is calculated and displayed, however the ID is replaced by “XXXXXXXX”
• If any of the test or quizzes scores are missing, the ID, and name are displayed, following by “MISSING GRADE” instead of the letter grade.
• If any mark is greater than the maximum, or a negative number display
“ILLEGAL MARK”
• If the length of the record is more than 100, the ID is displayed followed by
“ILLEGAL RECORD”
Example of an input file
12345678 Doe John, 89 44 2 – 9
Look at the assignment policy for details about submitting and marking