Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Problem: fb_series
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { int n = 5; Fibonacci fib = new Fibonacci(); int res = fib.fib(n); System.out.println(res); } } class Fibonacci { public int fib(int n) { if (n <= 1) return n; return fib(n-1) + fib(n-2); } }
run
|
edit
|
history
|
help
0
NumberBasedAlphabetsPrint
1
S
name
default constructor
ClientesJava v2
collectors and stream
Has A
1.6
bubble sort