Question: QUESTION 4: Write a program that calculate base salary and overtime pay of a worker if the number of hours worked is more than 40

 QUESTION 4: Write a program that calculate base salary and overtime

QUESTION 4: Write a program that calculate base salary and overtime pay of a worker if the number of hours worked is more than 40 hours. The user will enter the total hours and the hourly pay rate. The base salary is calculated by multiply the first 40 hours with hourly pay rate entered by user, then the overtime pay is calculated by number of hours worked minus 40 hours, multiply with (1.5 x hourly pay rate). If the number of hours worked in a week entered is 40 or less then the base pay is calculated by multiply 40 hours with hourly pay rate. Sample input Please enter total working hours: 43 Please enter hourly pay rate (RM): 12 Sample output Your buse salary is RM480 Your overtime pay is RM54 Your TOTAL INCOME is : RM534

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!