In C++, write a program that calculates and prints a monthly paycheck for an employee. The net pay is calculated after taking the following deductions from the employee's gross salary: Federal Income Tax: 17.5% State Tax: 9.1% Social Security Tax: 6.2% Medicare Tax: 1.45% Retirement Plan: 9.29% Health Insurance: $51.48 Life Insurance: $3.71 Your program will prompt the user to input the employee ID, the employee name, and the employee's monthly gross salary. The program will calculate the deductions listed above, along with the percentage of take home pay (defined as the net pay divided by the gross salary). After calculating each deduction and percentage, the output will be printed to the screen (see example output below). Requirements All decimal numbers must be formatted to 2 decimal places. Ask for the employee's ID first, then full name (can include spaces), then the salary. The prompt to enter the salary must include the employee name. The employee ID MUST be of type integer up to 4 digits. For this assignment, you do not have to perform input validation. For example, you may assume that if the user is prompted for an integer, that they only enter an integer. OUTPUT EX: Enter employee's id: 468 Enter employee's full name: Bilbo Baggins Enter gross salary for Bilbo Baggins: 2684.19 Paycheck for Bilbo Baggins, employeeId 468 Gross Amount: ................ $2684.19 Deductions Federal Tax: ................. $ 469.73 State Tax: ................... $ 244.26 Social Security Tax: ......... $ 166.42 Medicare Tax: ................ $ 38.92 Retirement Plan: ............. $ 249.36 Health Insurance: ............ $ 51.48 Life Insurance: .............. $ 3.71 Net Pay: ..................... $1460.30 Percent take home: ........... % 54.40
In C++, write a program that calculates and prints a monthly paycheck for an employee.
The net pay is calculated after taking the following deductions from the employee's gross salary:
Federal Income Tax: | 17.5% |
State Tax: | 9.1% |
Social Security Tax: | 6.2% |
Medicare Tax: | 1.45% |
Retirement Plan: | 9.29% |
Health Insurance: | $51.48 |
Life Insurance: | $3.71 |
Your program will prompt the user to input the employee ID, the employee name, and the employee's monthly gross salary. The program will calculate the deductions listed above, along with the percentage of take home pay (defined as the net pay divided by the gross salary).
After calculating each deduction and percentage, the output will be printed to the screen (see example output below).
Requirements
- All decimal numbers must be formatted to 2 decimal places.
- Ask for the employee's ID first, then full name (can include spaces), then the salary.
- The prompt to enter the salary must include the employee name.
- The employee ID MUST be of type integer up to 4 digits.
- For this assignment, you do not have to perform input validation. For example, you may assume that if the user is prompted for an integer, that they only enter an integer.
OUTPUT EX:
Enter employee's id: 468
Enter employee's full name: Bilbo Baggins
Enter gross salary for Bilbo Baggins: 2684.19
Paycheck for Bilbo Baggins, employeeId 468 Gross Amount: ................ $2684.19
Deductions
Federal Tax: ................. $ 469.73
State Tax: ................... $ 244.26
Social Security Tax: ......... $ 166.42
Medicare Tax: ................ $ 38.92
Retirement Plan: ............. $ 249.36
Health Insurance: ............ $ 51.48
Life Insurance: .............. $ 3.71
Net Pay: ..................... $1460.30
Percent take home: ........... % 54.40
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
Can you please advise on how this