Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
3e
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' //Sarmistha 7048 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { int n,a=0,b=1; System.out.println("Enter no. of values to be printed:"); Scanner scanner=new Scanner(System.in); n=scanner.nextInt(); System.out.println("Fibonacci Series of"+n+"numbers:"); int i=1; while(i<=n) { System.out.print(a+""); int c=a+b; a=b; b=c; i++; } } }
run
|
edit
|
history
|
help
0
Document management system - build unordered list (table of contents) recursively
Convert ArrayList to array in java
Java Replace Method
jb12.0 threads.enums
Fraction implementation using oops in java
4.a
Bbs
JAVA # DİZİ İLE EN BÜYÜK BULMA
sortArraymerge
tilt