Using the knowledge in computational language in C++ it is possible to write a code that define a function scalegrade() that takes one integer parameter as the student's score and one character parameter passed by pointer as the student's grade.
#include<iostream>
using namespace std;
bool ScaleGrade (int points, char &grade) //function definition
{
if (points >= 67 && points < 80) //points validation
{
if (grade == 'C') //when grade equals to 'C'
return false; //then returns false
grade = 'C'; //assigns 'C' to grade
return true; //returns true
}
return false;
}
int
main ()
{ //declarations
int studentTotal;
char studentGrade;
bool isChanged;
cin >> studentTotal;
cin >> studentGrade;
isChanged = ScaleGrade (studentTotal, studentGrade); //funcion calling
if (isChanged)
{
cout << "Grade is " << studentGrade << " after curving." << endl;
}
else
{
cout << "Grade " << studentGrade << " is not changed." << endl;
}
return 0;
}
See more about C++ at brainly.com/question/19705654
#SPJ1