subject

You've been hired by Paycheck Penguins to write a C++ console application that determines the pays and taxes on a paycheck. Use a validation loop to prompt for and get from the user a paycheck period in the range A-Z. Each letter corresponds to a two-week period. Use a validation loop to prompt for and get from the user an hourly real-number rate in the range 18-36 $/hour. Use a validation loop to prompt for and get from the user an integer number of hours worked in the range 60-120. Then calculate the gross pay, federal tax, FICA (Social Security and Medicare) tax, state tax, and net pay based on the hourly rate and time worked. Here are the formulas:

gross pay = hourly rate * time worked
federal tax = gross pay * 0.15
FICA tax = gross pay * 0.0765
state tax = gross pay * 0.0435
net pay = gross pay – federal tax – FICA tax – state tax

Format the following eight outputs into two formatted columns:

Paycheck period
Hourly rate
Hours worked
Gross pay
Federal tax
FICA tax
State tax
Net pay

The first column is a left-justified label with units ($/hour, hours, $, etc.) as needed. The second column is a right-justified value. Format all real numbers to two decimal places. Use formatted output manipulators to print the output. Declare and use constants for the federal tax rate, FICA tax rate, gross pay rate, and the column widths. Run the program five times with different inputs for hours worked and hourly rate. What are the results?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:00
Which demographic challenge is europe currently experiencing? a. an aging and decreasing population b. a baby boomc. an unequal distribution between males and females d. a large group of teenagers moving through the school system(i chose a but i'm unsure)
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
Install and use wireshark program ( send back screen shots and other vital information) case project 3-2: decode a tcp segment in a wireshark capture in this chapter, you walked through tcp segment to interpret the data included in its header. in this project, you use wireshark to capture your own http messafes, examine the tcp headers, and practice interpreting the data you'll find there. 1. open wireshark and snap the window to one side of your screen. open a browser and snap that window to the other side of your screen so you can see both windows.
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
The option enables you to modify a slide element in most presentation applications.
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the can apple do to fix this issue?
Answers: 1
You know the right answer?
You've been hired by Paycheck Penguins to write a C++ console application that determines the pays a...
Questions
question
Mathematics, 25.03.2020 06:47
question
English, 25.03.2020 06:47
question
German, 25.03.2020 06:48
question
Mathematics, 25.03.2020 06:48
question
Mathematics, 25.03.2020 06:48
question
Mathematics, 25.03.2020 06:49
Questions on the website: 13722360