Home/Blog/Algorithms & Exams

Recursive Functions in Structograms: Factorial and Base Cases

2026-11-306 min read

Base Case First

Always guard the base case in an If/Else branch before calling the function recursively in the else branch.

Live Example (DIN 66261)

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

fakultaet(n)Rückgabe: 1Rückgabe: n * fakultaet(n -1)n <= 1wahrfalsch

More Articles