I keep getting this error and do not understand why something is not returning. I have attempted changing some things around but it does not seem to do anything. I told the program to return 0 back to the user but for some reason this is still an issue. Any help would be greatly appreciated. Thanks!
Code:
#include <iostream>
using namespace std;
char grade(int x)
{
if (x >= 90) {
return 'A';
}
if (x >= 80) {
return 'B';
}
if (x >= 70) {
return 'C';
}
if (x >= 60) {
return 'D';
}
if (x >= 0) {
return 'F';
}
}
int main(void)
{
int s_grade; // student grade
cout << "What is the score: ";
cin >> s_grade;
cout <<"A score of " << s_grade << " is equal to a grade of " <<
grade(s_grade) << endl;
return 0;
}