I don't understand logically what is causing this too happen, but the "Dropped Grade" & "Average" are always coming out as "-858993460" & "286331275.00".
The program is suppose to have you enter 4 scores then find the lowest score & then calculate the average & then display the lowest score & average. Then it loops back and starts on a new student and repeats the process 3 times, but the outcomes of average & lowest come out all wrong.
If someone could please explain what logically is going wrong that would be great & what I should do differently.
using namespace std;
void getData(int score, int rows, int &low, double &avg)
for(int R=0; R < rows; R++)
low = score[R];
for(int C=0; C < 4; C++)
cout << "Enter test score " << (C+1) << " for student " << (R+1) << ": ";
cin >> score[R][C];
}while(score[R][C] < 0 || score[R][C] > 100);
TOT += score[R][C];
if (score[R][C] < low)
low = score[R][C];
avg = (TOT - low) / 3.0;
cout << fixed << setprecision(2);
cout << endl;
cout << "Dropped Grade: " << low << endl;
cout << "Average: " << avg << endl;
int sc, low;
getData(sc, 3, low, avg);