Premium Essay

It210 Wk3Hw3 Sequentialandselectionprocessingcontrolstructure 53013

In:

Submitted By dbelle
Words 259
Pages 2
Associate Program Material
Appendix G

Sequential and Selection Process Control Structure

In the following example, the second line of the table specifies that tax due on a salary of $2,000.00 is $225.00 plus 16% of excess salary over $1,500.00 (that is, 16% of $500.00). Therefore, the total tax is $225.00 + $80.00, or $305.00.

| |Salary Range in Dollars |Base Tax in Dollars |Percentage of Excess |
|1 |0.00-1,499.99 |0.00 |15 % |
|2 |1,500.00-2,999.99 |225.00 |16 % |
|3 |3,000.00-4,999.99 |465.00 |18 % |
|4 |5,000.00-7,999.99 |825.00 |20 % |
|5 |8,000.00-14,999.99 |1425.00 |25 % |

Problem Analysis: Process: 1. Display welcome message with program title 2. Get the salary 3. Calculate the taxes 4. Output the results

Input:

Salary (real: Salary)

Output:

Total taxes (real: Taxes) Salary

Input-Process-Output Chart

|Input |Processes |Output |
|Salary (from keyboard) |Get Salary |Salary |
|Salary |Calculate Taxes |Taxes |
|Salary, Taxes |Output

Similar Documents