Thank you :)
Printable View
Thank you :)
The names of the functions should give you hints. The display function is only there to display the values. It's getAndCalcAverages's job to calculate the average. Note that you got the return type wrong. It's supposed to be float - it's supposed to be the average.
That's why display has four parameters: the three numbers plus the average.
Well given the prototype, maybe you're supposed to pay attention to the return result,
avg = getAndcalcAverages(firstNumber,secondNumber,thirdN umber);
And perhaps avg is the 4th float passed to display()
Thank you :)
No. Did you even change anything?
You have to calc the averages in the function that has "calcAverages" in its name.
And you have to return it.
Thank you :)
You have to do more work. You have to change the return type of the function. You also have to use the returned value.
Do you remember how to use functions that return values? Go back to your book/notes/reference and brush up on the details.
Thank you :)
Looks better.
Now to remove that conio dependency, and you're all good to go.