What is Fibonacci series example? - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
What is Fibonacci series example?

What is Fibonacci series example?

import java.util.Scanner;
class Fabonicci
{

 public static void main(String[]args)
 {
   int num, a=0,b=0,c=1;
 
  Scanner in =new Scanner(System.in);
   System.out.println("Enter the number how much fabinnocies");
   num=in.nextInt();
   System.out.println("Fabbonic Series of the number is");
   for(int i=0;i<=num;i++)
   {
      a=b;
  b=c;
  c=a+b;
  System.out.println(a+"");
 
   }
 }
}

for(int i=0;i<=num;i++)
{
a=b;
b=c;
c=a+b;
System.out.println(a+"");
}

About EasyToCode

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

0 comments:

Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.