Problem

Write the C++ code for a function that receives four double numbers. The function should...

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

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