Question: Write a program that requests the hours worked in a week and then prints the gross pay, taxes and net pay according to the

Write a program that requests the hours worked in a week and then prints the gross pay, taxes and net pay

Write a program that requests the hours worked in a week and then prints the gross pay, taxes and net pay according to the given pay rate. Assume the following: a) Overtime (in excess of 38 hours) is paid at 1.5 times the (basic) pay rate. b) Tax rates: 15% of the first 300 20% of the next 200 25% of the next 150 30% of the rest The pay rates should be controlled by a menu, which is displayed at the beginning of the program's execution and should look like this: Enter the number corresponding to the desired pay rate: 1 - 8.50 GBP/hour 9.90 GBP/hour 3 22.40 GBP/hour 30.00 GBP/hour 2- 4 * Choices 1 through 4 are selected by means of an integer number, then the program should request the number of hours worked in a week. Otherwise, the program should terminate. In the test part of your report, specify the results provided by your program for: i) 24 hours at 8.50 GBP/hour; ii) 30 hours at 30 GBP/hour; iii) 55 hours at 9.90 GBP/hour; and iv) the user selects an invalid option from the menu (for example 0 or 7).

Step by Step Solution

3.33 Rating (144 Votes )

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!