I'm stuck and everything is correct except the Grade wont display, any help would be appreciated!
#include <iostream>
using namespace std;
void calcScore(int grade, double&total);
int main()
{
//declare variables
int score = 0;
int totalPoints = 0; //accumulator
char grade = ' ';
//get first score
cout << "First score (-1 to stop): ";
cin >> score;
while (score != -1)
{
//update accumulator, then get another score
totalPoints += score;
cout << "Next score (-1 to stop): ";
cin >> score;
} //end while
//display the total points and grade
cout << "Total points earned: " << totalPoints << endl;
cout << "Grade: " << grade << endl;
return 0;
} //end of main function
void calcScore(int grade, double & total)
{
if (total >= 315)
grade = 'A';
else if (total >= 280)
grade = 'B';
else if (total >= 245)
grade = 'C';
else if (total >= 210)
grade = 'D';
else
grade = 'F';
}