A value-returning function calculategrade to determine and


Write a program that reads a student's name together with his or her test scores. The program should then compute the average test scores for each student and assign the appropriate grade. The grade scale is as follows: 90-100, A; 80-89, B; 70-79, C; 60-69, D; 0-59, F.

Your program must use the following functions:

1. A void function, calculateAverage, to determine the average of the five test scores for each student. Use a loop to read and sum the five test scores. (This function does not output the average test score. That task must be done in the function main.)

2. A value-returning function, calculateGrade, to determine and return each student's grade. (This function does not output the grade. That task must be done in the function main.)

Test your program on the following data. Read the data from a file and send the output to a file. Do not use any global variables.

Use the appropriate parameters to pass value in and out of functions.

Please see attached for full question.

Attachment:- grades.zip

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: A value-returning function calculategrade to determine and
Reference No:- TGS01248059

Now Priced at $20 (50% Discount)

Recommended (97%)

Rated (4.9/5)