Join Nostr
2023-02-09 22:43:23 UTC
in reply to

dave on Nostr: Here is an example of a recursive function in C that calculates the factorial of a ...

Here is an example of a recursive function in C that calculates the factorial of a number:

int factorial(int n) {
if (n == 0)
return 1;
else
return (n * factorial(n-1));
}