Block of Code

Practical Examples for Programmers

  • Home
  • C++
  • Java
  • Visual Basic
  • Discrete Math
  • Ask a Question

Monthly Paycheck

Using C++, write a program that calculates and prints the monthly paycheck for an employee.  The net pay is calculated after taking the following deductions:

Federal Income Tax: 15%

State Tax: 3.5%

Social Security Tax: 5.75%

Medicare / Medicaid Tax: 2.75%

Pension Plan: 5%

Health Insurance: $75.00

Your program should prompt the user to input the gross amount and the employee name.  The output will be stored in a file.  Format your output to have two decimal places. A sample output follows:

Bill Robinson

Gross Amount:……. $3575.00

Federal Tax:……….. $   536.25

State Tax:………. $ 125.13

Social Security Tax: $205.56

Medicare / Medicaid Tax: $98.31

Pension Plan: $178.75

Health Insurance: $75.00

Net Pay: $2356.00

Note that the first column is left-justified, and the right column is right-justified.

Secondary Sidebar

This is the secondary sidebar

Copyright © 2025 · Metro Pro Theme on Genesis Framework · WordPress · Log in