Define a function AdjustGrade() that takes two parameters: points: an integer, passed by value, for the student's score.
Posted: Fri Jul 08, 2022 6:34 am
Define a function AdjustGrade() that takes two parameters: points: an integer, passed by value, for the student's score. grade: a char, passed by reference, for the student's letter grade. ● ● AdjustGrade() changes grade to D if the points are greater than or equal to 55 and less than 70, and grade is not D. Otherwise, grade is not changed. The function returns true if grade has changed, and returns false otherwise. Ex: If the input is 55 F, then the output is: Grade is D after curving. 1 #include <iostream> 2 using namespace std; 3 4 | 5 6 int main() { 7 8 9 10 11 12 13 14 15 16 17 18 int studentScore; char studentGrade; bool isChanged; cin >> studentScore; cin >>studentGrade; isChanged = AdjustGrade (studentScore, studentGrade); if (isChanged) { cout << "Grade is " << studentGrade << " after curving." << endl; }