| Algorithms and Flowcharts | |||
| An algorithm is a
sequence of steps used to complete a task.
Algorithms may be presented...
A computer program is an algorithm written for a computer in a special programming language.
|
The word 'sequence' implies there is an order to the steps. | ||
Example in words :
|
|||
Example as a flowchart
:
|
Flowcharts have terminators
(Start and Stop boxes)...and the algorithm is determined by direction on
the flow
lines.
Decision boxes are diamond shaped. |
||
| Example in structured code :
|
Each line is executed in turn... | ||
| Exercise : Algorithms and Flowcharts | |||
| An algorithm is a sequence of
which are followed in order to complete a task.
An algorithm may be written down as for a computer, or as a .
|
|||
| (Green indicates success) | |||