Conditionals and Conditional Branches
Often there are times when you want a program to make a decision.
For example, suppose an accountant wishes to write a program that
will calculate and display the amount of tax to be paid by a number
of persons. For those with incomes of $10,000 per year or under,
the amountoftax is 17.5%. For those with incomes of over $10,000,
the tax is 20%. A flowchart for the program might look like this:
Start
Key in amount
of income.
{
Is
Yes
.
No
income over
;
$10,0007?
}
Compute
Compute
20%of income.
17.5%of income.
Displaytax.
Stop