Skip to content

Nassi-Shneiderman structogram: the full guide

A structogram (Nassi-Shneiderman diagram, NSD) shows an algorithm as nested boxes with no arrows. The whole logic reads top to bottom as a single block, which is why it is often required as an alternative to a flowchart. Below: every block shown visually, a live example, and how to build one from code in seconds.

Bubble sort as a Nassi-Shneiderman structogram: nested blocks instead of arrows. More examples

The three building blocks

Any algorithm is these three, nested inside one another. No arrows — nesting shows the control flow directly.

Input xy = x * 2Print y

Sequence

Actions one after another — a stack of boxes, top to bottom.

x > 0YesNosign = +sign = −

Branch

A condition splits into two columns, “Yes” on the left and “No” on the right.

while i < nsum = sum + i

Loop

A frame wraps the repeated body on the top and left side.

A live example

Grading a score — a branch nested after an input. This is exactly what rombik outputs from code.

gradeInput scorescore ≥ 90YesNoOutput «Excellent»Output «Other»

Figure 2 — grade

Structogram vs flowchart

Same logic, two views. A structogram is more compact and arrow-free; a flowchart is more familiar to graders. rombik builds both from the same code — flip one toggle.

ISO 5807 flowcharts: the full guide

Frequently asked questions

What is a Nassi-Shneiderman diagram?

A structogram: an algorithm drawn as nested rectangles instead of shapes joined by arrows. Sequence, branches and loops are blocks inside blocks. It is standardised in DIN 66261.

How is it different from a flowchart?

There are no arrows and no arbitrary jumps, so the structure of the program is visible from the nesting alone. That makes it a good fit for structured code and for checking that loops and branches are closed correctly.

How do I make a structogram from code?

Paste the code into the rombik editor and switch the view to Structogram. The same diagram exports to Word, PNG, SVG and the other formats, just like a flowchart.

Which constructs are supported?

Sequences, if/else and switch branches, loops with a pre-condition (for, while) and a post-condition (do…while), function calls and returns — in all 11 supported languages.