#include #include using namespace std; char coursegrade(int score); int main ()
ID: 3660599 • Letter: #
Question
#include #include using namespace std; char coursegrade(int score); int main () { int score; cout<<"Function returning grades"<<endl; cout<<"Enter your score"<<endl; cin>>score; char coursegrade(int score) { .................Line (X) switch (score/10) { case 0: case 1: case 2: case 3: case 4: case 5: return ('F'); case 6: return ('E'); case 7: return ('D'); case 8: return ('C'); case 9: return ('B'); case 10: return ('A'); } } cout<<"End of program"<<endl; } // The problem is that i am trying to return grades as a return function. I am trying to use switch function but when i try to compile i get the error in line (X) which says that '{ ' is not allowed before function definition //Explanation / Answer
the data is not clear.. please repost the question so dat i can give the best possible answer........
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.