73.8k views
5 votes
The weekly pay for an employee is determined based on the following parameters:

Standard work hours by week is 40 hours.
Hourly pay rate is $10.00 per hour
Overtime hours are paid at time and a half the rate (that is $15.00 per hour).
Design and implement a program (name it WeeklyPay) that read number of hours worked per week (as integer value), prints out the entered hours, and then prints out the gross earning. Organized your output following these sample runs.
Sample run 1:
You entered 20 hours.
Gross earning is $200.0
Sample run 2:
You entered 40 hours.
Gross earning is $400.0
Sample run 3:
You entered 50 hours.
Gross earning is $550.0

User Bsneeze
by
5.5k points

1 Answer

4 votes
394484845848585858484
User Lolbas
by
6.0k points