Biology, asked by AarshPandey007, 1 year ago

WAP to print a Fibonacci Series starting with 0 and 1 in JAVA

Answers

Answered by jsana0110
0

Better to put this question in 'computer science' section.Also remove it from chemistry section.

Thanks


AarshPandey007: But how?
Answered by OorjaPandey
0

Answer:import java.util.*;

public class fibonaccoi

{

   public static void main()

   {

       int a=0, b=1,c;

       System.out.println(+a);

       System.out.println(+b);

       c=a+b;

       System.out.println(+c);

       a=b;

       b=c;

       c=a+b;

       System.out.println(+c);

       a=b;

       b=c;

       c=a+b;

       System.out.println(+c);

   }

}

Similar questions