//This program reads a course score and prints the
//associated course grade
#include <iostream>
using namespace std;
void getScore(int& score);
void printGrade(int score);
int main()
{
int courseScore;
cout << "Line 1: Based on the course score, \n"
<< " this program computes the "
<< "course grade." << endl;
getScore(courseScore);
printGrade(courseScore);
return 0;
}
void getScore(int& score)
{
cout << "Line 4: Enter course: ";
cin >> score;
cout << endl << "Line 6: Course score is "
<< score << endl;
}
void char printGrade(int cScore)
{
char gr = " ";
if (cScore >= 90)
gr = "A";
else if (cScore >= 80)
gr = "B";
else if (cScore >= 70)
gr = "C";
else if (cScore >= 60)
gr = "D";
else
gr = "F";
return gr;
}
Every time I try to compile this I get errors. Please help.