Fibonacci Series In Java
class Fibonacci { public static void main(String args[]) { int a=1,b=1,c; System.out.println(+a); System.out.println(+b); for(int i=1;i<=10;i++) { c=a+b; System.out.println(+c); a=b; b=c; } } } Output: 1 1 2 3 5…
class Fibonacci { public static void main(String args[]) { int a=1,b=1,c; System.out.println(+a); System.out.println(+b); for(int i=1;i<=10;i++) { c=a+b; System.out.println(+c); a=b; b=c; } } } Output: 1 1 2 3 5…