I am trying to write a C++ program that tells the inputter what their letter grade is after they input their number grade I cant seem to make this program run. It is of the form if-then-else, and I dont want to make any changes to it expect for the if-then-else section and the variables if necessary?! Can someone help me!!!!!!!!
int main()
{
int score;
char grade;
// read in total score
cout << endl ;
cout << "Enter total score (float, must be <= 100) : " ;
cin >> score ;
//compute grade
if (score >= 85)
{grade = 'A'};
else if (score >= 75)
{grade = 'B'};
else if (score >= 65)
{grade = 'C'};
else if (score >= 55)
{grade = 'D'};
else {grade = 'F'};
// display the result
cout << endl ;
cout << "Your grade for CMIS 102 is: " << grade << endl ;
return (0); // terminate with success
int main()
{
int score;
char grade;
// read in total score
cout << endl ;
cout << "Enter total score (float, must be <= 100) : " ;
cin >> score ;
//compute grade
if (score >= 85)
{grade = 'A'};
else if (score >= 75)
{grade = 'B'};
else if (score >= 65)
{grade = 'C'};
else if (score >= 55)
{grade = 'D'};
else {grade = 'F'};
// display the result
cout << endl ;
cout << "Your grade for CMIS 102 is: " << grade << endl ;
return (0); // terminate with success
Comment