I have the code working but it is not what the instructor is wanting. Here is what I am having to do:
Write a C++ console application that asks the user to enter the hourly wage and number of hours worked for each week in a 4-week pay period. Create a custom function with appropriate input parameters and return type that calculates the total gross pay based on the values entered by the user. Use suitable loops for the user input and the processing of data entered by the user. The program should print out the gross pay for the pay period for the employee.
He is wanting an array to pass the information He said "You need a procedural program with a custom function (also called a user-defined function) that calculates the gross pay for the pay period. Remember, the pay period is 4 weeks. This means that you will need to use an array to pass the hours data to the custom function, since the overtime needs to be calculated on a week-by-week basis. To give you an idea, the prototype for the function should be something like: