Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 704 Bytes

README.md

File metadata and controls

13 lines (7 loc) · 704 Bytes

Fibonacci-series-in-Java

This program produces the Fibonacci sequence in Java both using Recursion and without using Recursion

In fibonacci series, next number is the sum of previous two numbers for example 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 etc. The first two numbers of fibonacci series are 0 and 1.

There are two ways to write the fibonacci series program in java:

1: Fibonacci Series without using recursion

2: Fibonacci Series using recursion

Recursion is a method of solving a computational problem where the solution depends on solutions to smaller instances of the same problem. Recursion solves such recursive problems by using functions that call themselves from within their own code