Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Program 2: You need a program to maintain information about your employees' payroll. Assume that you have the following employees: Name Hours Worked Hourly Rate
Program 2: You need a program to maintain information about your employees' payroll. Assume that you have the following employees: Name Hours Worked Hourly Rate State Tax Rate Federal Tax Rate Durant, Steph 42.5 $55.16 19.7% 6.8% Curry, Kevin 38.75 $49.77 16.3% 9.88% Green, Clay 24.3 $49.99 16.7% 6.95% Thompson, Draymond 54.35 $66.66 20.5% 8.53% Write a C program that will perform the following tasks: Task 1: Allow the user to enter in the data for each employee. (The user will not enter the $ or % symbols.) Task 2: For each employee, calculate the gross pay, the federal tax owed, the state tax owed, and the net pay. The formulas to use are as follows: gross pay = hours worked * hourly rate (do not worry about overtime pay for this program.) federal tax owed = gross pay * federal tax rate / 100 state tax owed = gross pay * state tax rate / 100 net pay = gross pay-federal tax owed - state tax owed Task 3: Print out the name for each employee followed by the results of your four calculations from Task 2. Task 4: Calculate and print the total gross pay, the total federal tax owed, the total state tax owed, and the total net pay for all four of the employees. Please make sure that you only use one set of variable names for this program. For example, for the Hours Worked, do not use variable names such as hw1, hw2, hw3, hw4. Use only the variable name hw for each of the Hours Worked. For full credit on each program, please paste your output to the bottom of your program listing as a comment and make sure to include your full name at the top of the program as a comment. Also please make sure to format your output properly. For example, include appropriate spacing and blank lines and format money amounts to two decimal places after the decimal point
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started