Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions

Question

Identify global safety and health issues.

Answered: 1 week ago

Question

Determine the roles of spatial layout and functionality.

Answered: 1 week ago