Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

An employee is paid at a rate of $16.78 per hour for regular hours worked in a week. Any hours over that are paid at

An employee is paid at a rate of $16.78 per hour for regular hours worked in a week. Any hours over that are paid at the overtime rate of 1.5 times that. From the worker's gross pay, 6% is withheld for social security tax, 14% is withheld for federal income tax, 5% is withheld for state income tax, and $10 per week is withheld for union dues. If the worker has three or more dependents, then an additional $35 is withheld to cover the extra cost of health insurance beyond what the employer pays. Write a C++ program that will read in the number of hours worked in a week and the number of dependents as input, and will then output the worker's gross pay, each withholding amount, and the net take-home pay for the week. Your program should allow the calculation to be repeated as often as the user wishes.

Write a C++ code to do this task taking steps you define at Part 1.

  • The regular work hours is 40 hours a week.
  • Declare variables to express all constant values used in the code with the modifier const.
    • For example,
    • const double pay_rate_per_hour=16.78;
  • Use appropriate data type for each variable.
  • Amounts in dollar should be formatted; show 2 digits of fraction part to represent the cent, like $456.20.

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

Step: 3

blur-text-image

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

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions

Question

Which form of proof do you find least persuasive? Why?

Answered: 1 week ago