Question: Write a C program that will calculate the overtime and gross pay of a set of employees given the number of hours they worked in

Write a C program that will calculate the overtime and gross pay of a set of employees given the number of hours they worked in a given week. The clock, wage, hours, and calculated values for overtime hours and gross pay should be printed for each employee.
Unlike the first assignment, you don't have to prompt for the number of employees to process up front. Instead use a constant as your loop test ... for example, if you have 5 employees to process, then create a constant and set it to that value.
For each employee the program should prompt the user to enter the clock number, wage rate, and number of hours as shown below.
Clock# Wage Hours
98401 10.60 51.0
526488 9.75 42.5
765349 10.50 37.0
34645 12.25 45.0
127615 8.35 0.0
The program determines both the overtime hours (anything over 40 hours) and the gross pay, and outputs the following format. Hours over 40 are paid at time and a half.
------------------------------------------------
Clock# Wage Hours OT Gross
------------------------------------------------
098401 10.60 51.0 11.0 598.90

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!