home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-07-23 | 261 b | 13 lines |
- public class Fibonacci
- {
- /*
- * Not the most efficient implementation of the Fibonacci numbers...
- */
- static int Fib(int n)
- {
- if (n == 0) return 0;
- if (n == 1) return 1;
- return Fib(n-1) + Fib(n-2);
- }
- }
-