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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

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

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Can you please advise on how this program would look in C?

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Algebraic Expressions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education