I'm trying to make a program where it will add up the letter grade entered and give how many students made an A, B,C etc...
I'm stuck and not sure what to do next
some things may be out of line, due to I was trying different things and not cleaning up very well
Can I get help?
#include <iostream>
#include <fstream>
using namespace std;
//function prototypes
void scoreByGrade (double scores[20], int enteredScoreA, intt enteredScoreB, int enteredScoreC, int enteredScoreD, int enteredScoreF);
int main()
{
//declare array
double scores[20]
//declare variables
int enteredScoreA;
int enteredScoreB;
int enteredScoreC;
int enteredScoreD;
int enteredScoreF;
// create file object and open the file for append
ofstream outScores;
outScores.open("scores", ios::app);
//determine whether the file was opened
if (outScores.is_open())
{
// get scores entered
cout<<" Please enter you're 20 scores: ";
}
if (score>=94 && score<=100)
{
cin >> enteredScoreA;
}
else if (score>=86 && score<=93)
{
cin >> enteredScoreB;
}
else if (score>=78 && score<=85)
{
cin >> enteredScoreC;
}
else if (score>=70 && score<=77)
{
cin >> enteredScoreD;
}
else if (score>=0 && score<=69)
{
cin >> enteredScoreF;
}
outScores.close();
} else
cout << "The Scores files could not be opened" << endl;
} // end if //end of adding scores
//display scores total by grade
scoreByGrade
cout << "Number of students earning a score of " << enteredScoreA << ": "
<< total << endl;
cout << "Number of students earning a score of " << enteredScoreB << ": "
<< total << endl;
cout << "Number of students earning a score of " << enteredScoreC << ": "
<< total << endl;
cout << "Number of students earning a score of " << enteredScoreD << ": "
<< total << endl;
cout << "Number of students earning a score of " << enteredScoreF << ": "
<< total << endl;
system("pause");
cin.get();
return 0;
} //end of main function
//*********function definitions**********
void scoreByGrade (double scores[20], int enteredScoreA, intt enteredScoreB, int enteredScoreC, int enteredScoreD, int enteredScoreF)
{
for (int enteredScoreA=0; x<20; x = x +1)
if (score[x] == enter)
total=total+1;
// end if
//end for