Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

Where those not participating, encouraged to participate?

Answered: 1 week ago

Question

3. Who would the members be?

Answered: 1 week ago