// factorial_long.c the simplest example of a recursive function // a recursive function is a function that calls itself long int factorial_long(long int n) // n! is n factorial = 1*2*...*(n-1)*n { if( n <= 1 ) return 1; // must have a way to stop recursion return n * factorial_long(n-1); // factorial calls factorial with n-1 } // n * (n-1) * (n-2) * ... * (1) // note: "C" makes 1 be 1l long