Skimming over the code again there are a couple of small issues.

There is a difference between the code I provided and yours.
You have also changed something else, something eRaaaa questioned and you changed to something else.

Also, what happens if wage is less than 0?

Regards.