Question: Write a program that displays a message, asks a user to enter the number of hours worked in one week, and the base hourly rate
Write a program that displays a message, asks a user to enter the number of hours worked in one week, and the base hourly rate in dollars. The program then computes the weekly gross pay for the user or produces an error message if erroneous data was inputted. An example of an erroneous data is when the user enter strings instead of numbers. It should be noted that (1) the employee is paid 1.5 times the base hourly rate for hours worked above 40 hours but below or equal 60 hours, (2) the employee is paid 2 times the base hourly rate for hours worked above 60 hours Example output: Four Reals Incorporated Weekly Gross Pay Calculator Enter number of hours worked: 45 Enter your base hourly rate: 10.75 Your weekly gross pay is 510.625 dollars
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
