Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
3.E
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' // Razak-7051 import java.util.*; import java.lang.*; class Rextester { public static void main(String[] args) { int n, a = 0, b = 1; System.out.print("Enter no.of values to be printed : "); Scanner scanner = new Scanner(System.in); n = scanner.nextInt(); System.out.print("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
JAVA # Rastgele 15 sayıdan oluşan bir dizinin EK-EB ve Ortalamasını bulan Java Kodu
Interference
Palindrome Number in Java
생성자
Word pattern
Find Median in Large File of Integers
Max palindrome string
Qu1java.java
Coding Challenge - 01 (Even numbers)
Java messing around