Math, asked by King51512527, 9 months ago

Write a menu driven program to print the following series

a. 0 1 1 2 3 5 8…………… n terms if user enters 1 and the sum of

following series if users enters 2​

Answers

Answered by topwriters
2

Printing a Fibonacci series

Step-by-step explanation:

The given series 0, 1, 1, 2, 3, 5, 8..... is called a Fibonacci sequence. It is a series of numbers where a number is the sum of the previous two numbers in the series.

So starting with 0 and 1, the sequence goes on to build as 1, 2, 3, 5, 8, 13, 21......

To print the Fibonacci series, we need three programs using FOR loop, WHILE loop and based on the number entered by the user in Java programming language.

Similar questions