Advertisement
rygyfygy

FIBONACCI

Oct 30th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.10 KB | None | 0 0
  1. //FIBONACCI
  2. int fib(int n)
  3. {
  4. if(n <= 1) return n;
  5. else return fib(n - 2) + fib(n - 1);
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement