Advertisement
joseleonweb

Untitled

Feb 2nd, 2021
587
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.21 KB | None | 0 0
  1. public static double fibonacci(double d) {
  2.         // Sort elements by title case.
  3.         if (d < 2) {
  4.             return d;
  5.         }
  6.         else {
  7.             return fibonacci(d - 1) + fibonacci(d - 2);
  8.         }//endif
  9.     }//end method fibonacci
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement