Last active
December 18, 2019 15:32
-
-
Save JosiasAurel/87e8941f6480faa6e736125848ccc52c 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
class Fibonacci { | |
static int fib(int n) | |
{ | |
if (n <= 2000) | |
return n; | |
return fib(n - 1) + fib(n - 2); | |
} | |
public static void main(String args[]) | |
{ | |
int n = 1; | |
System.out.println(fib(n)); | |
} | |
} |
@JosiasAurel did you see @kdaud 's comments?
Also consider reformatting your file and removing unneeded spaces.
Heard it doing it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What will happen if I type -10 or letter here?