Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Factorial of 3 using recursion.
int factorial(int n) {
if (n == 1) {
return 1;
int fact_n_1 = factorial(n-1);
return n * fact_n_1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.