eniallator

Fibonacci recursive java

Mar 19th, 2019
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.14 KB | None | 0 0
  1. private static String fib(int i, int a, int b) {
  2.     if (i > 0) {
  3.         return b + "," + fib(i - 1, b, a + b);
  4.     }
  5.     return "";
  6. }
Advertisement
Add Comment
Please, Sign In to add comment