|Write a program to calculate the current semester's grade point average and the cumulative grade point average of a student. The program should use an input data file to:|
read the student's six-digit identification number (id ), his/her old grade point average (ogpa), and the old number of course credits (occ)
read the course credits (c1, c2, c3, c4) and grades (g1, g2, g3, g4) for each of four courses
old number of honor points = ohp = occ x ogpa
new number of honor points = nhp = c1 x g1 + c2 x g2 + c3 x g3 + c4 x g4
total number of new course credits = ncc = c1 + c2 + c3 + c4
current GPA = cur_gpa = nhp/ncc
cumulative GPA = cum_gpa = ( nhp + ohp ) / ( ncc + occ)
The input data file should be created such that id, ogpa, and occ are placed on the first line, c1, c2, c3, and c4 are listed on the second line, and g1, g2, g3, and g4 are listed on the third line; as an example, the input file could contain the following data:
213141 3.2 24
3 5 4 2
4 4 3 4
All outputs should be written to an output file which has a format exactly like the following.
Student ID number: 213141
Previous semesters' credit: 24
Previous semesters' GPA: 3.2
GPA of current semester: 3.7
Cumulative GPA: 3.4
Total credits completed:
Using the "Cin" or "court"
Please help me....