int factorial(int N) { if (N == 0) return 1; const int prev_fact = factorial(N-1); return N * prev_fact; }