Question
Problem B: Making Decisions Determine an employees gross pay using the number of hours worked and the hourly pay rate. The user will enter the
Problem B: Making Decisions
Determine an employees gross pay using the number of hours worked and the hourly pay rate. The user will enter the hourly rate of pay and the number of whole hours worked. If the number of hours worked is greater than 40, then the hourly rate of pay is increased to 1.5 times the regular rate of pay for those hours above 40.
Program Requirements:
The program should:
Prompt the user for the hourly rate (double) and the number of whole hours worked (integer)
Use output manipulators to format the output as seen below
Make use of constant variables rather than literals within your program
Sample OUTPUT:
Enter your hourly rate of pay: xx.xx
Enter the number of hours worked: x
Hours worked = x
Base pay = $xxx.xx
Overtime pay = $xxx.xx
Gross pay = $xxx.xx
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started