hello,
here's part of my program to find the mode..
so basically, ive managed to get my program works..
my program needs to output the NAME OF STUDENT who got the median, lower quartile, and upper quartile mark.. i managed to get the right mark for those 3 mark and ive found the correct mode alsoo.. but the problem is that, the marks dont match the students' name.. so i decided to put those extra codes in the sortMarks function ( the one that i put // in front of the code )..
but when i put that, i always get the wrong mode eventough now i have the correct students' name who got those 3 mark ( median, etc)
so whats wrong with it? how come when i added extra codes (with // in front), the mode suddenly changes in value.. but, i though that it shouldnt affect anything for the findMode function.. help!!
here's part of my program to find the mode..
Code:
int id[MAX_STUDENT];
string name[MAX_STUDENT];
float mark [MAX_STUDENT];
struct StudentInfo {
int id;
string name;
float mark;
};
StudentInfo stud[MAX_STUDENT];
so basically, ive managed to get my program works..
my program needs to output the NAME OF STUDENT who got the median, lower quartile, and upper quartile mark.. i managed to get the right mark for those 3 mark and ive found the correct mode alsoo.. but the problem is that, the marks dont match the students' name.. so i decided to put those extra codes in the sortMarks function ( the one that i put // in front of the code )..
but when i put that, i always get the wrong mode eventough now i have the correct students' name who got those 3 mark ( median, etc)
so whats wrong with it? how come when i added extra codes (with // in front), the mode suddenly changes in value.. but, i though that it shouldnt affect anything for the findMode function.. help!!