Write a program to analyze students course marks. The program should read in students course marks from "m2-grading.txt". The data file has a headline including students ID#, course-1marks, course-2 marks and course-3 markes. The total number of the student listed in the data file is unknow but it should be less than 100.
The program should calculate the maximum, minmum, average marks for each course, Store the data four statistic calculation results for each course to a 2-D(3*3) array. Finally, the program should print out the data from array to a table(an example of the format has been posted below) on screen and to a data file"m2-analysis.txt".
The program should use user defined function for the statistic calculations including maximum, minimum and acerage. It is OK to use more user defined functions in the program.
Course-1 Maximum 98.7 Minmum 45.6 Average 73.6
Course-2 Maximum 96.4 Minimum 55.7 Average65.0
Course-3 Maximum 99.8 Minimum 62.1 Average 78.9