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, 22.06.2019 09:50
Assume that you have an sorted array of records. assume that the length of the array (n) is known. give two different methods to search for a specific value in this array. you can use english or pseudo-code for your algorithm. what is the time complexity for each algorithm and why?
Answers: 1
question
Computers and Technology, 22.06.2019 13:00
Write a program which asks you to enter a name in the form of first middle initial last. so you might enter for example samuel p. clemens. use getline to read in the string because it contains spaces. also, apparently the shift key on your keyboard doesn’t work, because you enter it all lower case. pass the string to a function which uses .find to locate the letters which need to be upper case and use toupper to convert those characters to uppercase. the revised string should then be returned to main in the form last, first mi where it will be displayed.
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
Sports and entertainment class, your goal is to increase attendance and make a profit for a game by getting your team on a winning track with total salaries less than $3,000,000
Answers: 3
question
Computers and Technology, 24.06.2019 10:10
Which view in a presentation program displays a split window showing the slide in the upper half and a blank space in the lower half?
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, 27.05.2020 21:03
question
Social Studies, 27.05.2020 21:03
question
English, 27.05.2020 21:03
question
English, 27.05.2020 21:03
question
Social Studies, 27.05.2020 21:03
question
Mathematics, 27.05.2020 21:03
Questions on the website: 13722362