← Back to snippets

Algorithm: Recursive Factorial

This Typst code illustrates the recursive factorial algorithm (Factorial(A)), which computes the factorial of a number by repeatedly calling itself with decreasing values until it reaches the base case. The algorithm is written using a clean, custom syntax that defines simplified if and else constructs (new_if_loop and new_else_statement) without the begin and end blocks. The layout is rendered through the algorithmic package for structured algorithm formatting.

Created by: Vivi-17
Last updated: 11/16/2025
Versions:?
Preview
100%
Algorithm: Recursive Factorial
Code
Loading...

Comments

Please log in to post comments.