Question: Type and turn in a complete C program to solve the following problem: You must read students data from the file which name class_grades.txt this

 Type and turn in a complete C program to solve the

following problem: You must read students data from the file which name

Type and turn in a complete C program to solve the following problem: You must read students data from the file which name class_grades.txt this file has in each line student_id and three different grades, the file contain up to 100 students but maybe contain less than 100, be care! (see picture 1) After your read the data you must compute the final grade for each students and save it in the new file which name "class_results.txt" by putting in each line student_id and his final grade, after the student list you must put number of students then you must compute the average of final grade and print it in the file, then print how many student above and below the average, finally you must print student_id for the student has the greatest grade and the student has the lowest grade. (see picture 2) You should have a four functions which take an array as parameter as follow: 1. To compute class average, the prototype must be: int average (int grades[], int no_of_students); 2. To compute number of students above the average, the prototype must be: int above (int grades[], int no_of_students); 3. To find the student has the greatest grade, assume there is only one student, the prototype must be: int greatest (int grades[], int students[], int no_of_students); 4. To find the student has the lowest grade, assume there is only one student, the prototype must be: int lowest (int grades[], int students[], int no_of_students); Picture 1 (demo for input file) class grades.txt 9 1000210 1000211 1000212 5 8 7 10 10 8 10 4 Picture 2 (demo for input file) class results.txt 27 1000210 1000211 1000212 20 24 # of students 3 average 20.3 above the average 2 below the average 1 greatest grade for 1000210 lowest grade for 1000212 3/3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!