could try this out - if (n==1 || n == 2) { return 1;} else { return (fib(n-1) + fib(n-2)); }
Whoa! What algorithm is that? It must be something absolutely new and ingenious: has anybody seen anything similar before?!? But... what language is that?
In reply to Re^3: Fibonacci Generator
by blazar
in thread Fibonacci Generator
by sifukurt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |