blob: ff7345dd8f6324a2730524208e8c1ecfe33408b8 [file] [log] [blame]
int fact(int n) {
if (n > 0) return n * <selection>fact</selection>(n - 1);
else return 1;
}
-----
int fact(int n) {
if (n > 0) {
int result
if (n - 1 > 0) result = (n - 1) * fact(n - 1 - 1);
else result = 1
return n * result
};
else return 1;
}