Computers and Technology

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?

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:00, blackjack73
3. (6 pts) internally in the computer, with few exceptions, all numerical computation is done using binary numbers. output, however, often uses ascii, which is formed by appending 011 to the left of a bcd code. thus, an algorithm that directly converts a binary integer to a bcd integer is very useful. here is one such algorithm 1) draw lines to the left of the binary number to bound the expected bcd decades. (each decade is a group of 4 bits.) move the binary number one bit to the left. add 0011 to each bcd decade containing a binary value> 0100 repeat steps 2-3 until the last bit in the binary number has been moved into the least significant decade position. (note that when the last bit has been shifted into bcd decade, step 3 is not repeated.) read the bcd result. 2) 3) 4) 5) a) execute the algorithm for the binary number 1101101 b) execute the algorithm for the binary number 01110101110 4. (4 pts) represent the decimal number 3568 in bcd; excess-3 code; ascil; and hex.
Answers: 1
image
Computers and Technology, 22.06.2019 12:10, tragesserj
1. declare a constant named cents_per_pound and initialize with 25. 2. get the shipping weight from user input storing the weight into shipweightpounds. 3. using flat_fee_cents and cents_per_pound constants, assign shipcostcents with the cost of shipping a package weighing shipweightpounds.
Answers: 2
image
Computers and Technology, 23.06.2019 04:00, coolconnor1234p0sv4p
Another name for addicting games. com
Answers: 1
image
Computers and Technology, 23.06.2019 05:00, bellad0124outlookcom
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
Do you know the correct answer?
You've been hired by Paycheck Penguins to write a C++ console application that determines the pays a...

Questions in other subjects: