Skip to content

Instantly share code, notes, and snippets.

@koduki
Created February 24, 2009 17:13
Show Gist options
  • Save koduki/69664 to your computer and use it in GitHub Desktop.
Save koduki/69664 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int fib(n){
if (n < 2) return n;
else return fib(n-2) + fib(n-1);
}
int main(){
int n = 39;
printf("39 : %d\n", fib(n));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment