Write a program that asks an employee how many hours were worked this week. The base pay rate is $12.50 / hr. For overtime hours (over 40), the employee should be paid 1.5 times the base rate (or 0.5 times base rate as a bonus...however you want to see it). Output 1: Enter the hours worked for the week as a whole number: [assume user types: 42] You worked 2 overtime hours Your total pay this week is $537.5 Output 2: Enter the hours worked for the week as a whole number: [assume user types: 36] Your total pay this week is $450 Hints and Notes: 1) There are many ways to do the math here. Use whatever method you are comfortable with, as I assume you’ve calculated this for your own job before. 2) Do NOT use an ELSE for this question. IF only.

Solved
Show answers

Ask an AI advisor a question