You have been provided with the framework of a program, that contains the main along with the function calls for 4 funct
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
You have been provided with the framework of a program, that contains the main along with the function calls for 4 funct
You have been provided with the framework of a program, that contains the main along with the function calls for 4 functions. Fill in the rest of the code for the function prototypes and function definitions to complete the program: DO NOT EDIT THE MAIN, only fill in the code for the prototypes and definitions. #include <iostream> using namespace std; Il Comments * This program is to read in two employee salaries and determine which salary * is the higher one * Finds the average of the two salaries Then output the two salaries, the larger one, and the average of both salaries. 7 //Function Prototypes 1/readsalaries A function to read in the two employee salaries V/FindLargest A function to find the larger of the two salaries //findAverage A function to find the average of the two salaries /printResults - A function to display the two employee salaries, which is the larger salary and the average of both salaries
//readsalaries - A function to read in the two employee salaries //findLargest - A function to find the larger of the two salaries //findAverage A function to find the average of the two salaries //printResults - A function to display the two employee salaries, which is the larger salary and the average of both salaries int main() { double salary1, salary2, maxSalary, average Salary: readSalaries (salary1, salary2); maxSalary = find Largest (salary1, salary2); average Salary = FindAverage(salary1, salary2); PrintResults (salary1, salary2, maxSalary, average Salary); return 0; //Function definitions