so I'm fairly new to C++ and I'm working this program to calculate the total of an individual students college tuition. I have to use a while loop, and at the end i have to calculate the total dues of all the students combined, how many are valid and invalid. it should look something like this
Student #: 101
Initials: AB
Residency status: resident
Credits: 14
Tuition: $ 1820.00
Total due: $ 1820.00
I don't know quite what your code looks like, but I assume you use if statements to determine whether a tuition is valid or not. So in your if statement just keep a counter that increments each time it is used.
1 2 3 4 5 6 7 8 9 10
int valid = 0;
int invalid = 0;
if( valid tuition ){
//+= tuition to whatever your variable is
valid++;
}else
invalid++;