The overall marks of the students in a particular class of 25 for 4 subjects CPPS, DFUND1, CKT AND EMATHS are maintained as arrays in an external data file. Assume that the arrays have already been initialized with values.
The following is a sample of the marks recorded for the class:
stud[0] stud[1] stud[2] stud [3]..................................stud[24]
cpps; 75 80 45 23 .................................................95
dfund1;77 65 26 99.................................................39
ckt; 100 55 44 85 ..................................................69
emaths;58 78 65 48................................................. 74
For your project declare initialized arrays for the 4 subjects with your sample values.
Write a program to show menu options that allows the user to display:
1. The marks of all 4 subjects for a student using a student ID 1 to 25
2. The number of grade A, B, C, D and F for the selected subject.
3. The average mark for the given subject.
You could do it that way I suppose. Then you would do something like:
You would simply do std::cout << "cpps " << cpps[5] << "dfund1 " << dfund1[5] < ect.... Though you would replace 5 with the selected student(-1 maybe unless you are going to have them enter student 0 as first).