Federal law requires that hourly employees be paid “time-and-a-half” for work in excess of 40 hours in a week. For example, if a person’s hourly wage is $12 and he or she works 60 hours in a week, the person’s gross pay should be (40 *12) + (1.5 *12 * (60-40)) = $840. Write a program that requests the floating number of hours a person works in a given week and the person’s hourly wage as input, and then displays the person’s gross pay

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 21PE
icon
Related questions
icon
Concept explainers
Question

1. Federal law requires that hourly employees be paid “time-and-a-half” for work in excess of 40 hours in a week.
For example, if a person’s hourly wage is $12 and he or she works 60 hours in a week, the person’s gross pay should
be (40 *12) + (1.5 *12 * (60-40)) = $840.
Write a program that requests the floating number of hours a person works in a given week and the person’s hourly
wage as input, and then displays the person’s gross pay. Save it as overtimePay.py

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning