Question: Write a program to compute the weekly pay for an employee. Use a switch statement to compute each employee's pay based on his/her code.

Write a program to compute the weekly pay for an employee. Use 

Write a program to compute the weekly pay for an employee. Use a switch statement to compute each employee's pay based on his/her code. A hourly worker has code 1 and receives a fixed hourly wage for up to the first 40 hours they work and 1.5 times their hourly wage, for overtime hours worked. A commission worker has code 2 and receives $250 plus 5.7% of their gross weekly sales. Sample Input/Output Enter the employee code: 1 Hourly worker selected. Enter hourly wage: 35 Enter the number of hours: 47 Hourly worker pay is $ 1767.5 Enter the employee code: 2 Commission worker selected. Enter weekly sales: 2500 Commission worker pay is $ 392.5 Enter the employee code: 3 Invalid code!!!

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 Programming Questions!