The Fibonacci sequence/series is a series where the next term is the sum of pervious two terms. The first two terms of the Fibonacci sequence is 0 followed by 1. The Fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21.
Java code for Fibonacci series
public class fibonacci_series
public static void main(Stringargs)
Scanner s=new Scanner(System.in);
System.err.print(“Enter till which Fibonacci series is to be printed :”);
System.out.println(n+” numbers in Fibonacci series are :”);