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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!