Write the C++ code for a function that receives four items of information: three by value and

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 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.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: