Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Description The payroll department needs a program to determine the weekly paycheck amount for each hourly worker. A neatly formatted pay stub is displayed to

Description

The payroll department needs a program to determine the weekly paycheck amount for each hourly worker. A neatly formatted pay stub is displayed to the screen.Learning ObjectivesIn this assignment, you will:Use selection control structuresWrite arithmetic statements using C syntaxDisplay neatly formatted output to the screenRequirements1.The user must be prompted appropriately.2.All values related to money may include values after a decimal point. All values related to money displayed to the screen must display with 2 places after the decimal.3.All values related to hours will not store values after the decimal.4.The user must indicate whetheror not the employee is a welder by typing a single character (y for yes, and n for no). Your program must be able to handle an upper or lowercase letter: Y, y, N, n.5.Overtime is the number of hours worked past 40 hours. For example, a worker with 43 weekly hours is paid according to the hourly wagefor 40 hours, and the last 3 hours are paid at an increased hourly wage. Welders are given double wagefor overtime pay. All other employees receive 1.5 times the hourly wage.6.Gross payis the amount of pay before any deductions (taxes, medical, and union dues). 7.After the gross pay is calculated, the paycheck amountis calculated by subtracting the deductions from the gross pay. a.Taxes and medicalare 30% of the gross pay.b.Only welders pay union dueswhichare2.5 times the hourly wageeach month.Divide this amount by 4 to get the weekly union dues.Note: if the employee is not a welder, the output will not include a line for union dues.8.The results must line up at the decimal point, as displayed in the sample runs.

Here is the output of what it would look like

Is the employee a welder?>n

Enter hourly wage> 12.00

Enter number of hours> 45

Gross pay$570.00

Taxes/medical171.00

Paycheck amount$399.00

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

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

1. List and briefly explain the dimensions of quality.

Answered: 1 week ago