Home/Blog/Guide & Examples

Euclidean Algorithm (GCD) as a DIN 66261 Structogram

2026-11-225 min read

Modulo Form of Euclid’s Algorithm

While b is non-zero, compute rest = a MOD b, set a = b, and set b = rest. Once b reaches 0, a holds the GCD.

Live Example (DIN 66261)

Rendered directly in DIN 66261 — click to open and edit in the workspace.

berechneGGT(a, b)rest = a MOD ba = bb = restb != 0Rückgabe: a

More Articles