c programming

Write a C program that uses four functions namely input(), getGrade(), output() and
main() to read in the average marks scored by a student and output the grade attained.
The input function is used to read marks for each 5 subjects and then returns the average
mark for a student. This function should only accept values that fall within the range 0-
100. The average mark is then passed as a parameter to the getGrade() function which
uses it to assign a grade based on the following classification:
Mark Grade
75 and above A
60 and below 75 B
50 and below 60 C
40 and below 50 D
Below 40 E
The mark and computed grade are the passed as parameters to the output() function,
which outputs the appropriately. All functions are called from main. Allow the program
to repeatedly ask a user for the average mark and display the grade.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!