Skip to content

Instantly share code, notes, and snippets.

@TranquilMarmot
Created March 9, 2013 06:36
Show Gist options
  • Save TranquilMarmot/5123178 to your computer and use it in GitHub Desktop.
Save TranquilMarmot/5123178 to your computer and use it in GitHub Desktop.
int fib(int x){
if(x <= 0)
return 0;
if(x == 1)
return 1;
return fib(x - 1) + fib(x - 2);
}
int main(){
int n, j;
n = 5;
j = fib(5);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment