Skip to content

Instantly share code, notes, and snippets.

@teejayvanslyke
Created November 19, 2009 02:34
Show Gist options
  • Save teejayvanslyke/238493 to your computer and use it in GitHub Desktop.
Save teejayvanslyke/238493 to your computer and use it in GitHub Desktop.
int factorial(int n) {
if (n > 1) return n * factorial(n-1);
else return 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment