CIS170C All Assignments CIS170C All Assignments | Page 7
You need to write a program that calculates and displays the take-home pay for a
commissioned sales employee along with all of the deductions.
Input: Prompt the user for the weekly sales.
Process: Perform the calculations. The employee receives 7% of his or her total sales as his or
her gross pay. His or her federal tax rate is 18%. He or she contributes 10% to his or her
retirement program and 6% to Social Security.
Output: Display the results
Pseudo Code:
1. Declare variables
2. Accept Input - weeklySales
3. Calculate Gross Pay = Weekly Sales * .07
4. Calculate Federal Tax = Gross Pay * .18
5. Calculate Social Security = Gross Pay * .06
6. Calculate Retirement = Gross Pay * .1
7. Calculate Total Deductions = Federal Tax + Social Security + Retirement
8. Calculate Total Take Home Pay = Gross Pay - Total Deductions
9. Display the following on separate lines and format variables with $ and decimal.
a. Total Sales Amount:
value of weekly sales