In my code, I am trying to enter four weeks worth of hours and get the weekly total and then total all four weeks for a gross pay for the month. My code applies the calcPay function to only the last week. How do I get it to apply it to the rest of the weeks?
At lines 25-29 you have a loop where the hours are entered. Inside that loop, just after getting the hours, call the calcPay() function.
But that won't be enough by itself. Each time it is called, it will generate a resulting value of wages.
I'm not sure what you want to do next. Perhaps print out the wages for each week inside that same loop. Or perhaps add it to a grand total and then after the loop is completed, print out the total for all four weeks. Or maybe both.