Define a function AdjustGrade() that takes two parameters: points: an integer, passed by value, for the student's score.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Define a function AdjustGrade() that takes two parameters: points: an integer, passed by value, for the student's score.

Post by answerhappygod »

Define A Function Adjustgrade That Takes Two Parameters Points An Integer Passed By Value For The Student S Score 1
Define A Function Adjustgrade That Takes Two Parameters Points An Integer Passed By Value For The Student S Score 1 (98.98 KiB) Viewed 41 times
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; }
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply