Engineering Blog

View on GitHub
30 January 2025

Another example

by Eric D. Cohen

Factorial works like this

Yet another test

uint64_t factorial(uint64_t num) {
    if (num == 1) {
        return 1;
    }

    return num * factorial(num - 1);
}
tags: