Guest User

Untitled

a guest
Aug 28th, 2013
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.16 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. long fib(long);
  4.  
  5. int main(void) {
  6.     fib(40);   
  7.     return 0;
  8. }
  9.  
  10. long fib(long n) {
  11.     if (n < 3)
  12.         return 1;
  13.        
  14.     return fib(n-1) + fib(n-2);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment