NEWBIE TO C++
Desperately need help figuring out how to accumulate total number of grades(A, B, C Etc..) in a student test program.
I'm using an array called int avg[20] Any ideas on how to get this thing going would be great! Here's were I am... I'm not sure if I'm on the right track.
Code:
void totalGrades(string stuName[], int t1[], int t2[], int t3[], int avg[], short size)
{
int x = 0;
int minScore = avg[0];
int maxScore = avg[20];
int count = 0;
int nsub = 0;
char grade = ' ';
x = 0;
while (x < 20)
{
if (avg[x] >= 90)
avg[x] = 'A';
count = count + 1;
if (avg[x] = >= 80)
avg[x] = 'B';
x = x + 1;
} //end while
cout << "Total Grades: "<< count << endl;
}
Thanks,
Seven