It does run.
The only thing you need to do is add something to let you see the result, before the window closes: Try putting a breakpoint on the
statement, that would help for testing, or use
to force another read from the keyboard before the application closes.
BTW: I would change the CalcPay function:
float CalcPay(float payrate, float hours)
if (hours > max_hours)
wages = (max_hours * payrate) + (hours-max_hours) *payrate *overtime;
wages= hours * payrate;
This way it returns the value, instead of modifying a parameter. That means you can use it in calculations:
float allPay = CalcPay(JoesRate, JoesHours) + CalcPay(MikesRate, MikesHours);