-
-
Save parzibyte/01595c087a1a6d3c72e7394e8d8ac4d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sucesión fibonacci recursiva en Java | |
* | |
* @author parzibyte | |
*/ | |
public static long fibonacciRecursivo(long posicion) { | |
if (posicion < 2) | |
return posicion; | |
return fibonacciRecursivo(posicion - 1) + fibonacciRecursivo(posicion - 2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment