Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Fibonacci
//Shadiyar Tazhgurazov 24.01.2022 import java.util.*; import java.lang.*; class Rextester { public static int fibonacci(int number){ if (number == 0) return 0; if (number == 1) return 1; return fibonacci(number-1) + fibonacci(number-2); } public static void main(String args[]) { int a[]=new int[20]; //declaration of array for(int i=0; i<20; i++) { a[i]=fibonacci(i); } for(int i=0; i<20; i++) { System.out.print(" "+a[i]); } } }
run
|
edit
|
history
|
help
0
Ab
Marvel
Java
Ip address
Java: Tower of Hanoi
Rextester.java
fb_series
Java # Dizi ile ek bulma
Integer to English Words
UserDefinedBar