Skip to content

Instantly share code, notes, and snippets.

@barrysteyn
Created April 18, 2013 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barrysteyn/5413430 to your computer and use it in GitHub Desktop.
Save barrysteyn/5413430 to your computer and use it in GitHub Desktop.
Fibonacci - Recursive
void fib(int n) {
if (n == 0) return 0;
if (n == 1) return 1;
return fib(n-1) + fib(n-2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment