Also write an appropriate function prototype for the calc


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 calc Average. Also write an appropriate function prototype for the calc Average function. In addition, write a statement that invokes the calc Average function. Use the following numbers and variable as the actual arguments: 45.67, 8.35, 125.78, 99.56, and num Avg.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Also write an appropriate function prototype for the calc
Reference No:- TGS01594496

Expected delivery within 24 Hours