C++ Write a program
TWO (2) groups of students at a private college university are enrolled in certain special courses during the special semester. The courses are taught by different lecturers. At the end of the semester, both groups are given the same tests for the same courses, and their scores are recorded in separate files. The data in each file is in the following form:
courseId1 score1, score2, ….., scoreN -999
courseId2 score1, score2, ….., scoreN -999
.
.
.
e.g. input file:
Input data for group1
CSC 80 90 70 83 75 -999
ENL 70 85 67 63 55 -999
.
.
.
You need to prepare two separate input files, one for each group. Name your input file as group1.txt and group2.txt. -999 indicate the end of record for the test mark. It should not be counted into the average mark.
You are then required to write a program that finds the average course score for each course for each group. The example output is of the following form:
Course Id Group No Course Average
CSC 1 79.60
2 74.45
ENL 1 68.00
2 69.42
.
.
.
Average for group 1: 82.04
Average for group 2: 81.32