Skip to main content

Java program to print "Fibonacci Series" using function

Java program to print  "Fibonacci Series" using function up to a particular number.

The Fibonacci series is a type series where each number is the sum of the two that precede it means the addition of the two numbers which came before the new number . It starts from 0 and 1 usually. The Fibonacci sequence is given by 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, and so on. The numbers in the Fibonacci sequence are also called Fibonacci numbers.




OUTPUT:




 

Comments

Popular posts from this blog

Sql keys and their types

 Sql Keys and their types Introduction : Sql keys is the key to your success in analytics!  Data is growing at an exponential rate and so is the demand for professionals who are well verse3d with the databases.  Organizations all over the world are looking for data scientists and analysts who can draw meaningful insights from the vast amounts of data. And one of the most important languages for handling databases is SQL. That is why those professionals with a background in SQL have an edge over their peers when it comes to working with databases.  Table of Contents : 1.What are keys in DBMS  2. Super key  3.Candidate key  4. Primary key   5 Alternate or Secondary key  6.Foreign key  7.Composite key   What are keys in DBMS  Database are used to store massive amounts of information which is stored across multiple tables. Each table might be running into thousands of rows. Needless to say, there will be many duplicate ro...

5 simple programs in Java || Java programs for Beginners

5 Simple Java Programs for  Beginners 1.Program to print Hello World public class Main       {                  public static void main(String[] args)                   {                          System.out.println("hello world!")                    }           } output:  hello world! 2.Program to Add two numbers public class Main      {           public static void main(String[] args)                {                     int a = 5;                     int b = 10;        ...