Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with C++ please. Thank you. Write a program named lab2 that calculates and prints monthly paycheck for an employee. The net pay is

Need help with C++ please. Thank you.

Write a program named lab2 that calculates and prints monthly paycheck for an employee. The net pay is calculated after taking the following deductions:

Federal Income Tax: 20% State Tax: 4% Social Security Tax: 3.5% Medicare/Medicaid Tax: 2.75% Pension Plan: 6% Health Insurance: $80.0

Your program should prompt the user to input the gross amount. Format your output to have two decimal places. A sample output follows:

Gross amount: 3587.00

Gross amount: $ 3587.00

Federal Tax:

$ 717.40
State Tax: $ 143.48
Social Security Tax: $ 125.55
Medicare/Medicaid Tax: $ 98.64
Pension Plan: $ 215.22
Health Insurance: $ 80.00
Net Pay: $ 2206.71

Note: The bold letters means the computer displays the output. The normal letters means you enter the input. Net pay = gross amount -(federal tax + state tax + social security tax + Medicare/Medicaid Tax + Pension Plan + Health Insurance)

Hints: You should be able to complete the program with the hints below.

#include #include using namespace std; //Declare all constant variables

int main() { //Declare variables your coding

// Calculate gross amount, federate tax, sale tax, social security, medicare/medicaid tax, pension plan, health insurance and net pay your coding

//Display output

cout<< left << setw(26) << "Gross Amount: " << right << " $" << setw(7) << grossAmount << endl;

Your coding

return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is meant by LIBOR and LIBID. Which is higher? AppendixLO1

Answered: 1 week ago

Question

6. Be able to choose and prepare a training site.

Answered: 1 week ago