Write the function calculate that receives the four revenue


Write a C++ program that will calculate the total and average revenue of a company and test the following three functions:getData, calculateanddisplayutilizes several functions that. Function 1 Write the void FUNCTION getData that asks the user to enter the revenue values of firstQ, secondQ, thirdQ, and forthQ.

All variables are of type double. Then the function will pass these values back to main program as parameters. Make sure to identify, if any, call by reference variables.

Function 2 Write the FUNCTION calculatethat receives the four revenue values firstQ, secondQ, thirdQ, forthQ through the parameter list, calculates both the total value of revenue (by summing the four revenue values) and calculates the average revenue (by dividing the total revenue by 4.0).

The function will then pass (send) the total back to main through the parameter list and returns the average to main.

Make sure to identify, if any, call by reference variables. Function 3 Write the void FUNCTIONdisplaythat receives the four revenue values, the total and average through the parameter list from main and displays the information to screen.

Make sure to identify, if any, call by reference variables.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write the function calculate that receives the four revenue
Reference No:- TGS01522242

Now Priced at $10 (50% Discount)

Recommended (90%)

Rated (4.3/5)