Question: Write the C++ code for a function that receives four items of information: three by value and one by reference. Each item has the double
Write the C++ code for a function that receives four items of information: three by value and one by reference. Each item has the double data type. Name the formal parameters num1, num2, num3, and avg. The function should calculate the average of the three numbers and then assign the result to the avg variable. Name the function calcAverage. Also write an appropriate function prototype for the function. In addition, write a statement that invokes the function, passing it the following actual arguments: janAvg, febAvg, marAvg, and quarterAvg.
Step by Step Solution
3.29 Rating (161 Votes )
There are 3 Steps involved in it
void calcAveragedouble num1 double num2 double num3 do... View full answer
Get step-by-step solutions from verified subject matter experts
