I need help with this program. here is what we are supposed to do.
The program should prompt the user to 'Please enter numeric grade: '.
The program will then pass the numeric grade to a function that will convert to a letter grade. This function should have the following prototype:
char get_letter_grade (int grade_num);
100-90 A
89-80 B
79-70 C
69-60 D
below 60 F
The character that is returned will then be sent to a function to determine if the letter grade is passing (grades higher than 59 are passing). This function should have the following prototype:
bool is_passing(char grade_letter);
Your program should then display the results. For example:
Please enter numeric grade: 83
The letter grade is: B.
The grade is passing.
Here is what i have so far.
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
int grade_num;
cout<< "Please enter numeric grade:"<< endl;
cin>> grade_num;
return 0;
}
char get_letter_grade (int grade_num)
{
if (grade_num<=60);
cout<< "The letter grade is F"<< endl;
else if ( grade_num<=69);
cout<< "The letter grade is D"<< endl;
else if (grade_num<=79);
cout<< "The letter grade is C"<< endl;
else if (grade_num<=89);
cout<< "The letter grade is B"<< endl;
else (grade_num<=100);
cout<< "The letter grade is A"<< endl;
return (grade_num);
}
bool is_passing(char grade_letter)
{