The modulus operator only operates on integers (I think). Also, you're "double adding" the over-forty hours (one copy at standard wage, and another at the overtime wage).

pay = (wage*40) +...