Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C program that determines the gross pay and net pay for each of n employees, then prints out a payroll summary report. For

image text in transcribed
Write a C program that determines the gross pay and net pay for each of n employees, then prints out a payroll summary report. For each employee, your program should prompt for the number of hours worked and the hourly rate of the worker. Once this information is entered, your program should calculate the gross pay, federal tax paid, and net pay for that employee. The company pays \"straight-time" for the first 40 hours worked by each employee, and pays \"time-and-ahalf" for all hours worked in excess of 40 hours. Use data type float for all values except loop variables. Your program should include the following mnctions(appropriately named): - Function 1 which is called to get the Company Name up to 30 characters. - Function 2 which is called to get the number of employees to process. Let's set a maximum of thirty employees as a maximum. - Function 3 which is called to determine the overtime pay. It would require 2 parameters passed to it (hourly rate, and hours worked), both of which are data type float. It would return the calculated overtime pay (as shown below), which is of data type float. This function should only be called if necessary (that is, when the number of hours worked is more than 40). - Function 4 which is called to calculate gross pay. It would require three parameters: hours worked, hourly rate, overtime pay, if any. - Function 5 which should be called to calculate the federal tax. it requires 1 parameter passed to it (gross pay), and should return the federal tax paid, both of which should be data type float. Assume that federal tax is 20% of gross pay up to $999.99 then 25% for amounts over that. - The last, Function 6 will be called to calculate the not pay. It requires 2 parameters, the gross pay and the federal tax. The dialog with the user must be as follows: (the welcome message can be designed of your own choosing) Welcome to the Sears Payroll Calculator Enter the Company Name: Acme House Painting Enter the number of employees(1-10): 3 Enter the name for employee 1: John Smith Enter the number of hours employee 1 worked: 36 Enter the hourly rate of employee 1: 30.00

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

What does the tape hum lucidum do ?

Answered: 1 week ago