Submitted by: Submitted by janaj
Views: 644
Words: 398
Pages: 2
Category: Science and Technology
Date Submitted: 10/21/2011 11:49 AM
Axia College 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 $2000.00 is $225.00 plus 16% of excess salary over $1500.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 % |
Flow Chart
Main module
Calculate tax and percentage module
salary =salaryamount-excess
salary amount 7999.99
Call salary 4 module
Else
If salary amount 8000.00 and salary amount > 14999.99
Call salary 5 module
Else
Write, “Salary information you enter is not computable.”
Write “Please enter salary between 0.00 and 14999.99”
Call input module
End salary range module
Pseudocode
Main Module
Declare Employee name as string
Declare tax Base as real
Declare Salary amount as a real
Declare Excess as real
Write “please enter the salary amount
Input salary amount
Call calculate Tax percentage module
Call display module
End main module
Call calculate tax_percentage module
If set excess= salaryamount*.015
Set salary =salaryamount-excess
If salary4999.99 then
Set excess=16.00
Tax=0
End if
If Set...