I am trying to write a function that will count test scores that fall in a specific range(90-100, 89-80, 79-70, 69-60 and 60 or below) that are stored in a two dimensional array. Also, I am supposed to write a function that will do the same as above, only this one will count the number of students whose test score average will fall into each of those ranges. Here is the code I have so far:

[CODE]

include
include
include
include

using namespace std;

void storeData(string studentNames[10], int scores[10][5]);
void calculateData(int scores[10][5],double average[10], int& i, int& j, double& classAverage);
void outputResults(double average [10], int& i, string studentNames[10], double& classAverage);

int main()
{
string studentNames[10];
int scores[10][5];
double average[10];
int i, j;
double classAverage;
storeData(studentNames, scores);
calculateData(scores, average, i, j, classAverage);
outputResults(average, i, studentNames, classAverage);
}
void storeData(string studentNames[10], int scores [10][5])
{
ifstream inFile;
inFile.open ("data.txt");
if (!inFile)
{
cout << "Unable to open file." << endl;
cout << "Program will now terminate" << endl;
system("exit:");
}
int i, j;
for(i = 0; i < 10; i++)
{
inFile >> studentNames[i];
for(j = 0; j < 5; j++)
{
inFile >> scores[i][j];
}

}
inFile.close();

}

void calculateData(int scores[10][5],double average[10], int& i, int& j, double& classAverage)
{
int sum = 0;
for(i = 0; i < 10; i++)
{
sum = 0;
for(j = 0; j < 5; j++)
{
sum = sum + scores[i][j];
}
average[i] = sum / 5;
}
classAverage = (scores[0][0] + ...