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

I think this may be what I need to be called to count the grades.

Can someone help with this?

/*********function definitions**********
// Count of letter grades entered

void scoreByGrade (int enteredScoreA_count=0, enteredScoreB_count=0, enteredScoreC_count=0,
enteredScoreADcount=0,enteredScoreF_count=0)


while(grade != SENTINEL) // Add to grade counts until SENTINEL is entered.
{
	switch(scores)
	{
	case 'A':
	enteredScoreA++; // Add 1 to count of A grades
	break;

	case 'B':
	enteredScoreB++; // Add 1 to count of B grades
	break;

	case 'C':
	enteredScoreC_count++; // Add 1 to count of C grades
	break;

	case 'D':
	enteredScoreD_count++; // Add 1 to count of D grades
	break;

	case 'F':
	enteredScoreD_count++; // Add 1 to count of F grades
	break;



	}


 }

 // end switch
//end while
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.