
please wait
|
|
getTestScores
are passed by value...
|
|
void getTestScores(double s1, double s2, double s3)
. Simply change it to void getTestScores(double &s1, double &s2, double &s3)
.void displayAverage()
function, remove av =0.0;
. Because it will display zero, not matter what your average is.
|
|
first thing is to remove the statement av =0.0; because doing so would assign 0.0 to av which would subsequently get displayedalso pass your a,b,c by reference as in your function getTestscores you feed the values to s1, s2 , s3 which wont affect a,b,c unless you pass them by reference the above code should work |