CIS 170 (Devry) help Making Decisions/uophelp.com CIS 170 (Devry) help Making Decisions/uophelp.com | Page 6
Take home pay: 1293.60
Press any key to continue . . .
Flowchart: (continued on next page)
Pseudo Code:
1. Declare variables 2. Accept Input - weeklySales 3. Calculate Gross
Sales * .07 4. Calculate Federal Pay * .18 5. Calculate Social Pay * .06 6.
Calculate Pay * .1 7. Calculate Total Tax + Social Security + Retirement
8. Calculate Total Take Home Pay - Total Deductions 9. Display the
following on separate lines and format variables with $ and decimal. a.
Total Sales Amount: value of weekly sales b. Gross Pay (.07): value of
gross pay c. Federal Tax paid (.18): value of federal tax d. Social
Security paid (.06): value of social security e. Retirement contribution
(.1): value of retirement f. Total Deductions: value of total deductions g.
Take Home Pay: value of take home pay
Note: Use SetPrecisions(2) to format the output (see page 98 of the text).
The statements should look something like the following:
//include the iomanip header file at the top of the file
#include
//use fixed and setprecision(2) to format the number
//use setw(8) to control the width of the field
//use \t to control the spacing between fields
cout< fixed="">
cout< "gross="" pay="" (0.07):\t=""
$"="">
---------------------------------------------------------------------------------
CIS 170 C iLab 3 of 7: Looping
For more course tutorials visit