Back

Program flowcharts

Introduction
There are a number of ways to write an algorithm. One way is to use a flowchart. We will describe the symbols used in a flowchart and give an example of their use.

Symbols
The following symbols are the most common ones used in flowcharts, although there are others and if you read around this topic, you may find slight variations in their use.

symbols

An example of a flowchart
Here is an example of a flowchart that describes the discount given for buying products in a club’s shop. The discount given depends upon your membership type.


You begin and end the flowchart with a start / stop symbol. You then input your membership type.

    • If it is gold, you get 25% discount and a message is displayed stating the discount given.
    • If it is silver, you get 20% discount and a message is displayed stating the discount given.
    • If it is bronze, you get 15% discount and a message is displayed stating the discount given.
    • If you are not a member, you get 10% discount and a message is displayed stating the discount given.

An example of a FOR loop and using subroutines
Suppose you had to carry out a set of instructions a fixed number of times. In programming code, you would use a FOR loop for this. But stepping back for a moment, how might you represent this as a flowchart?

There are some useful tools for making flowcharts around. There is a drawing toolbar in both Word and OpenOffice that can be used for drawing neat flowcharts. Meesoft's ‘Diagram Designer’ is also excellent (and free). If your school has Logicator, that's also an excellent way of getting experience producing good flowcharts.

Back