I need some help. I want this program to ask the user how many grades they would like to enter. Than when the user inputs it should ask for the prompt enter your grades as many times as the user wanted. Than assign each letter to the number of grades. When i run the application i can only enter one grade and it assigns it to "The number of A's is:". Here is what i have so far
// may 10 2010
#include <iostream>
using namespace std;
int main ()
{
int numberGrades;
int gradeCount[5] = {0};
char letterGrade;
cout << "How many grades would you like to enter? ";
cin >> numberGrades;
for (int count =0; count <= numberGrades; count++);
{
cout << "Enter the grade ( A, B, C, D, E): ";
cin >> letterGrade;
switch (letterGrade)
{
case 'A':
case 'a':
gradeCount [0]++;
break;
case 'B':
case 'b':
gradeCount [0]++;
break;
case 'C':
case 'c':
gradeCount [0]++;
break;
case 'D':
case 'd':
gradeCount [0]++;
break;
case 'E':
case 'e':
gradeCount [0]++;
break;
default:
cout << "\aInvalid letter grade!\n";
}//end switch
} // end for
letterGrade = 'A';
for ( int index = 0; index <5; index++)
{
cout << "\nThe number of " << letterGrade << "'s is: " <<gradeCount[index];
letterGrade++;
}// end for
cout << endl << endl;
return 0;
}