Flowchart Symbols
Flowchart Symbols
Flowcharts
Flowcharts are diagrams used to help us visualise the sequences
of algorithms. They use a set of symbols with a little text in each
Simple tasks have simple flowcharts and complex tasks can have
flowcharts with thousand of components. They are especially
useful for novice programmers if they can fit on one page; however,
Start
if they take up several pages they become difficult to follow and
may be ineffective. Programmers use many different symbols to
draw flowcharts but we will start with four basic symbols that are
Connected by arrows.
Rectangle -
operation
217
Programming
Table 9.12 Summary of the verbs and control structures used when writing pseudocode
There are lots of examples ot pseudocode coming up in the following section. bu
now let us look at an alternative way to represent an algorithm: flowcharts.
TO9.15
Watch a video that
Using flowcharts to represent algorithms
introduces flowcharts. A flowchart is a pictorial way of representing an algorithm using a set of stanaar
What is a rhombus symbols (shapes).
shape used for in a Flowcharts use different symbols to represent
input, processing and ouip
flowchart? operations. Operations are connected with arrows which serve as flow lines.
Flowcharts are usually drawn from top to bottom or left to right. tis importan
that the symbols are used as intended so that the completed flowchart is clear
the programmers. Examples of correct usage of the five standard flowchart symbos
are shown below.
ITQ 9.16 Each flowchart should have only two terminal symbols. The first one sno
Which is the only flowchart symbol be labelled either 'Begin' or "Start and the other labelled either "End or 'Stop
which MUST be used at least twice Begin' and 'End' will be used in all flowcharts in this chapter. This will help t
in every flowchart? easily convert the algorithms to program code later.
270
9 Problem-solving and program design
TO9.17
What isthe purpose of flowlines in
The input/output symbol is used to document data that is coming in or going out
of the program. If multiple data items are being input or output one after the other
a flowchart? then include them in the same symbol.
The process symbol is used to show variables being initialised to starting values
The
and variables being assigned new values provided by an arithmetic operation.
following are all valid labels:
STORE 1 TO X
X = I
X I
X:= 1
We will use the
='as our assignment symbol in all our flowcharts.
COunter = 0
cOunter =
average
sum = 0 COunter +1 total/counter
Correct labelling of the process symbols. Note that each symbol has only one flow line entering and
Figure 9.8
one leaving
symbol is used when ihe flow can miss out a process or pass to one
The decision
of iwo possible processes depending on a condition.
While there are very firm rules governing the
no labelling of the decision
symbol, good practicc suggests that you should label the:
271