WAP to print a Fibonacci Series starting with 0 and 1 in JAVA
Answers
Answered by
0
Better to put this question in 'computer science' section.Also remove it from chemistry section.
Thanks
AarshPandey007:
But how?
Answered by
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