program that the relevant data, such as the student number, number of modules and the module codes. the program should validate the number of modules that a student is allowed to register for and calculate the student fees plus the discounts awarded for each student. thereafter an invoice should be displayed. this invoice should indicate the student number, number of modules the student is registering for, total registration fees (after deducting the discount), and the discount awarded. the program should also calculate and display the total value of discounts awarded to all the students.
Line 109: This is going to be displayed whether a discount was calculated or not.
Line 112: Setting studentFees to 0 here works only because you don't have any break statements in your loop. A break statement would cause this statement to be skipped. It's better style to set studentFees to 0 at the top of the loop then you don't have to worry that the code stops working if you add a break statement at some point in the future.
You never increment totalFees anywhere. Not clear if totalFees is per student, or an overall total. I'm assuming an overall total, since studentFees represents per student fees.
I would change lines 101-103 as follows:
101 102 103 104
cout <<"Studentfees : R ";
cout.width(10);
cout << studentFees << endl; // Fees for this student
totalFees += studentFees; // Accumulate total fees.