Question
Asked by:
computadorageek
computadorageek
Rating : No Rating
Questions Asked: 3
Tutorials Posted: 1, earned $0.00
 

$20.00 Hourly Employee Calculator using "C" programming

Q:
Objective:
Write a C program which will do weekly payroll calculations for hourly employees. For each employee calculate gross pay, federal tax, state tax, insurance deduction and net pay. Allow any number of employees to be processed. Also generate a summary report as specified below.

Specification:
- Assume that employees earn regular pay for the first 40 hours, time and a half pay for hours between 40 and 50 and double time pay for all hours over 50.
- Assume that the state tax rate is 5% of the gross pay.
- Assume that the federal tax rate varies based on the gross pay as follows:
22% if the gross pay is $600 or less.
27% if the gross pay is over $600 but less than $1500.
33% if the gross pay is $1500 or more.
- Assume that an insurance premium of $58 is deducted weekly for each employee, but only if the employee works at least 30 hours.
- The net pay for each employee will be gross pay minus deductions.
- For each employee display:
hours worked, payrate, gross pay, federal tax rate, federal tax deduction, state tax rate, state tax deduction, insurance premium and net pay.
- Label all outputs.
- After all employees are entered print the following summary information:
The number of employees processed.
The total gross pay for all employees.
The average net pay for all employees.
Dollar amounts should be printed with dollar signs ($) and two decimal places.
Use named constants where appropriate.
Use proper indentation (notice the style in the textbook).
Use variable names which convey meaning.
Format the output neatly. Make it easy to read and understand.
 


   
   
   
   
Cognitive_Coders asked: Can you tell me in which C compiler i need to implement this. That is what is the Compiler you using for C. Is it TurboC compiler or Borland?
To which computadorageek said: we just use the terminal in mac os or with windows we use putty does this help?
 
Available Tutorials to this Question
Posted by:
rainman
rainman
Rating (40): A+
Questions Asked: 2
Tutorials Posted: 174, earned $906.64
 

$15.00 C Program Tutorial And Code For Hourly Employee Calculator. Compiled, Tested, Works!

  • This tutorial was purchased 1 time and hasn't been rated yet.
  • Posted on May 21, 2009 at 02:27:17PM
A:
Preview: ... Y)<br> //keep looping to get all of the data<br> while (toupper(another) == 'Y')<br> {<br> //We only need the hours worked and the pay rate to calculate<br> //all of the other variables.<br> printf("How much, per hour, does this employee make: $");<br> scanf("%lf", <br> printf("Enter how many hours the employee worked: ");<br> scanf("%lf", <br><br> //We'll print out the information into two columns<br> printf("\\n");<br> printf("Pay Rate: $%.2lf\\n", payRate);<br> printf("Hours Worked: $%.2lf\\n", hours);<br><br> //notice the %.2lf, here is what each part means<br> //% - means a variable will be put into the output<br> //.2 - means we want to show 2 decimal places<br> //lf means we are displaying a doulbe<br><br> gross = 0.0;<br><br> //If we work more than 50 hours<br> //Any hours worked after 50 is double time: 2.0*payRate*(hours - 50.0)<br> //Time and a half between 40 and 50 (10 hrs): 1.5*payR ...

The full tutorial is about 1411 words long plus attachments.

Attachments:
main.c (4K)
image.PNG (10K)
Posted by:
vipinrl
vipinrl
Rating (24): C-
Questions Asked: 0
Tutorials Posted: 115, earned $191.95
 

$10.00 Compiled, tested Source code & Output Screenshot attached

  • This tutorial hasn't been purchased yet.
  • Posted on May 21, 2009 at 04:48:51PM
A:
Preview: ... (iHoursWorked[i] <= 40)<br> fGrossPay = iHoursWorked[i] * fPayRate;<br> else if(iHoursWorked[i] > 40 && iHoursWorked[i] <= 50)<br> fGrossPay = (40 * fPayRate) + (iHoursWorked[i] - 40) * (fPayRate / 2);<br> else if(iHoursWorked[i] > 50)<br> fGrossPay = (40 * fPayRate) + 10 * (fPayRate / 2) + (iHoursWorked[i] - 50) * (fPayRate * 2);<br> <br> //calculating federal tax rate for each employee<br> if(fGrossPay <= 600)<br> fFederalTaxRate = 0.22;<br> else if(fGrossPay > 600 && fGrossPay < 1500)<br> fFederalTaxRate = 0.27;<br> else if(fGrossPay >= 1500)<br> fFederalTaxRate = 0.33;<br> //calculating the federal tax deduction for each employee<br> fFederalTaxDeduction = fGrossPay * fFederalTaxRate;<br><br> //calculating the state tax deduction for each employee<br> fSateTaxDeduction = fGrossPay ...

The full tutorial is about 345 words long plus attachments.

Attachments:
PayrollCalculation.C (3K)
PayrollCalculation.jpg (85K) (Preview)
Posted by:
 

$14.00 Complete Prog and neat Output as you Required - A+ standard

  • This tutorial was purchased 1 time and hasn't been rated yet.
  • Posted on May 21, 2009 at 09:07:12PM
A:
Preview: ... are completed. If you nee ...

The full tutorial is about 21 words long plus attachments.

Attachments:
EMPLOYEE.zip (22K)
   
Join Now or Log In
Get Tutoring
Get Paid
Academic Honesty