Write a program that reads a student's name, together with his or her test scores for at most 50 students from a file, provided by users of your program. The program should then compute the average test score for each student and assign the appropriate grade. The grade scale is as the follows:
The program also calculates the class average.
There is a test file, prog7_input.txt,you may use for testing. The following are a few examples you may find in the file
Johnson 85 83 77 91 76
Aniston 80 90 95 93 48
Cooper 78 81 11 90 73
Gupta 92 83 30 69 87
Blair 23 45 96 38 59
Clark 60 85 45 39 67
Kennedy 77 31 52 74 83
Bronson 93 94 89 77 97
Sunny 79 85 28 93 82
Smith 85 72 49 75 63
But, your program must prompt the name of the actual input file which is determined at run time by users.
In the program, you must use four arrays:
Your program must contain at least the following functions:
You may declare global constants, but do not use any global variable. Use the appropriate parameters to pass values in and out functions.
The output should be displayed on the screen in the form as following sample output: ( Fill the last two columns with student's average and grade, and the bottom line with the class average.) Round the averages to one decimal place.
A sample output is shown on next page. See image.
Here, the question marks mean you have to fill these columns with calculation results. Print the output in the alphabetic order of students' names.