1.write A Program in JAVA To Display The Fibonacci Series
1.write A Program in JAVA To Display The Fibonacci Series
import java.io.*;
int a=Integer.parseInt(in.readLine());
int b=Integer.parseInt(in.readLine());
int c,n;
c=0;
n=0;
System.out.println("a");
System.out.println("b");
do
c=a+b;
System.out.println(c);
a=b;
b=c;
n=n+1;
while(n<8);
System.out.println("THANK YOU");
OUTPUT
THIS PROGRAM IS TO GENERATE 10 VALUES OF FIBONACCI SERIES.
23
32
55
87
142
229
371
600
971
1571
THANK YOU