but for 61 hours, it shud give me. 316
koz the first 35 hrs give zero, the next 25 hrs give 300 and the remaining give 16
here is the question,
A worker is paid at the hourly rate of Rs8 per hour for the first 35 hours worked. Thereafter, overtime is paid at 1.5 times the hourly rate for the next 25 hours worked and 2 times the hourly rate for further hours worked. Write a program to input the number of hours worked per week and output the overtime paid.
Get number of hours.
Subtract 35.
if number is zero or less than zero, overtime is zero.
if number is 25 or less, overtime equals number times 1.5 * 8
if number is 26 or more, overtime equals (25*1.5*8 + (number-25)*2*8)