Algorithms and Flowcharts
An algorithm is a finite, unambiguous sequence of steps; a flowchart draws those steps as shapes and arrows.
Beginner
An algorithm must be finite (it ends), definite (each step is clear) and effective (each step can actually be done), with defined inputs and outputs.
A flowchart visualises an algorithm:
| Shape | Meaning |
|---|---|
| Oval | Start / end |
| Parallelogram | Input / output |
| Rectangle | Process (a calculation) |
| Diamond | Decision (yes / no) |
Example — find the larger of two numbers:
START → read a, b → is a > b ? → yes: print a
→ no: print b → END
Writing the algorithm first saves a lot of debugging later.
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.