Reference no: EM132355447
Question
Write program to compute payroll information for an employee.
Input: The program should ask the user for the following:
1. Social Security Number
2. Last Name
3. First Name
4. Hours
5. Payrate
Processing: The program should calculate the following:
1. Gross pay. NOTE - for more than 40 hours, payrate should be one and a half times and regular payrate. Example: For 42 hours and payrate 10/hr, the gross pay would be calculated by multiplying 40 of the hours by the regular payrate (10) and then multiplying the remaining 2 overtime hours by 15, and then adding those two quantities together for a gross pay of 430.
2. Amount withheld for social security taxes (assume a rate of 7.5%)
3. Amount withheld for Federal income tax (assume a federal tax rate of 25%)
4. Amount withheld for state income tax (assume a state tax rate of 7%)
5. Total of deductions
6. Net pay
Output: print a report, labelling each of the items as shown in the following example:
Payroll Report
Social security number: 501-11-1111
Name: Joseph Johnson
Hours: 40
Payrate: $9.00
Gross pay: $360.00
SS Tax withheld: $27.00
Federal Tax withheld: $90.00
State Tax withheld: $25.00
Total Deductions: $142.00
Net Pay: $217.18