Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.12 KB | None | 0 0
  1. public static int Fib(int x)
  2.     {
  3.         if (x == 0) return 1;
  4.         if (x == 1) return 1;
  5.         else return Fib(x-1) + Fib(x-2);
  6.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement