Problem

Write the C++ code for a function that receives five double numbers: four by value and o...

Write the C++ code for a function that receives five double numbers: four by value and one by reference. Name the formal parameters num1, num2, num3, num4, and avg. The function should calculate the average of the four numbers and then assign the result to the avg variable. Name the function calcAverage. Also write an appropriate function prototype for the calcAverage function. In addition, write a statement that invokes the calcAverage function. Use the following numbers and variable as the actual arguments: 45.67, 8.35, 125.78, 99.56, and numAvg.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search