Jul-30-2022, 05:00 PM
I'd use float instead of int. I want to get paid for my entire 2.5 hours of overtime.
I would not use if or else to solve this problem. I would use min and max.
The most common error I see with this problem forgetting that overtime rates are only applied to overtime hours and regular rates to regular hours. No double dipping!
I would not use if or else to solve this problem. I would use min and max.
The most common error I see with this problem forgetting that overtime rates are only applied to overtime hours and regular rates to regular hours. No double dipping!