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. 1 0.00-1,499.99 0.00 15 %
2. 2 1,500.00-2,999.99 225.00 16 %
3. 3 3,000.00-4,999.99 465.00 18 %
4. 4 5,000.00-7,999.99 825.00 20 %
5. 5 8,000.00-14,999.99 1425.00 25 %
Input Process Output
First Name
Last Name
Gross Salary Get user Input First Name
Last Name
Gross Salary
Gross Salary Determine Range Category Salary Range
Salary Range Category
Percentage of Excess Base Tax Determine Base Tax and Percentage of Excess Percentage Excess Total Base Tax
Net Salary Determine Net Salary Net Salary
First Name
Last Name
Gross Salary
Net Salary Display Net Salary Full Name
Gross Salary
Net Salary
Main Module
Declare name as string
Declare salary as real
Declare excess as real
Declare base as real
Call input data module
Call salary range module
Call range1 module
Call range2 module
Call range3 module
Call range4 module
Call range5 module
Call output module
Call start over module
End Main Module
Input Module
Write, “employees first name”
Input first name
Write, “employees last name”
Input last name
Write, “employees gross salary”
Input gross salary
End Input Module
Call Salary Range Module
If gross salary < 1,499.99
Then Call range1 module
If gross salary > 1,499.99 and 2,999.99 and 4,999.99 and 7,999.99