Question: Complete the following program in C language: This program reads two values. The first is an hourly wage(double) and the second is the number of
Complete the following program in C language:
This program reads two values. The first is an hourly wage(double) and the second is the number of hours worked(integer) in a week. The program will compute the total weekly pay based on the following guide:
Regular time, 0 to 40 hours, use the regular hourly rate
Overtime, 41-50 hours, regular rate for the first 40 hours and 1.5 times hourly rate for hours over 40
Double-time, 51 or more hours, regular rate for the first 40 hours, 1.5 times the hourly rate for the next 10 hours, and 2.0 times the hourly rate for all hours over 50
Examples of correct output:
Entering 8.50 and 25 gives a weekly pay of $212.500000
Entering 12.50 and 45 gives a weekly pay of $593.7500000
Entering 17.50 and 65 gives a weekly pay of $1487.500000
This program should be written with variables, assignments, selection, and iteration. Nothing more advanced.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
