Wyo C++                                                                                                                 Name -
Ch. 10 Wksht #3

Write a function that accepts a struct variable of type Student that is passed by reference. The function must compute and return the double value obtained as a student's grade average when dividing the member variable pointsPossible by the member variable pointsEarned.

Write out the complete function definition below following the function header provided.

double computeGrade(Student & studentIn)
// precondition:   studentIn is a struct variable with integer members pointsEarned & pointsPossible
//                       pointsEarned & pointsPossible hold values between or including 1 and 500
// postcondition:  returns a decimal value representing a student's grade average (pointsEarned / pointsPossible)