How to Create a Structogram: Step-by-Step Guide with Examples (DIN 66261)
1. What Is a DIN 66261 Structogram?
A structogram (Nassi-Shneiderman diagram, standardized as DIN 66261) represents algorithms using nested rectangular blocks instead of arrows. Control flow always moves strictly from top to bottom.
Because unstructured jumps cannot be drawn, structograms naturally enforce clean, structured programming and are widely used in computer science courses and vocational exams.
2. The 7 Core Building Blocks
DIN 66261 defines seven universal building blocks:
- Sequence: A plain rectangle for assignments, variable declarations, input, or output.
- Subroutine: A rectangle with double vertical side bars representing a function or procedure call.
- Branch (If / Else): Diagonal header split into true (left) and false (right) columns.
- Switch-Case: Multi-way branch for testing one expression against multiple discrete values.
- While Loop (head-controlled): Condition on top; checks before every iteration (0+ runs).
- Do-While Loop (tail-controlled): Condition at bottom; always executes at least once (1+ runs).
- For Loop (counting): Iterates across a known counter range with start, end, and step.
3. Four-Step Method (Input–Process–Output)
Break down every programming task into Input, Processing, and Output: declare and read inputs at the top, add branches and loops in the middle, and place the output or return value at the bottom.
Live Example (DIN 66261)
Rendered directly in DIN 66261 — click to open and edit in the workspace.
Frequently Asked Questions
Do structograms need Start and End ovals?
No. Unlike flowcharts, DIN 66261 structograms do not use Start/End ovals — the algorithm name sits at the top of the frame.