Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C+ program to calculate a person's pay stub assuming paid on a monthly basis Your design must be according to the structure chart

image text in transcribedimage text in transcribed

Write a C+ program to calculate a person's pay stub assuming paid on a monthly basis Your design must be according to the structure chart given here. That is main0 will call input function, calculation function, and output function in that order main( Input all data Handles all calculations Output Computes federal tax and FICA INPUT Input the employee's name, hourly wage, hours worked, withholding allowances, marital status as 'M' or 'S', and previous year-to-date earnings. All input is to be carried out in the input function. CALCULATIONS There is one main calculation function which calls another function that will compute the FICA tax and the federal income tax. Current earnings are computed as hourly wage times hours worked (extra credit if your program pays time-and-a-half after 40 hours) Year-to-date earnings need to be updated by adding in current earnings .To compute FICA, if year-to-date earnings are less than $128,700, multiply current earnings by 6.2%; if year-to-date earnings greater than or equal to 128,700 there is no FICA tax i.e. 0.00 .To compute federal income tax to be withheld, first subtract the product of the withholding allowances times 345.80 from current earnings and compute tax according to chart below: If the amount of wages (after subtracting withholding allowances) Tax is IS: Not over $308 Over- $0 But not over- $308 $1,102 $0.00 plus 10% of the amount over 308

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

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions