Computer Science, 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 harnathyadav2907
4

Explanation:

The Fibonacci sequence is a series of numbers where a number is the sum of previous two numbers. Starting with 0 and 1, the sequence goes 0, 1, 1, 2, 3, 5, 8, 13, 21, and so on. Here we will write three programs to print fibonacci series 1) using for loop 2) using while loop 3) based on the number entered by user

To understand these programs, you should have the knowledge of for loop and while loop.

If you are new to java, refer this java programming tutorial to start learning from basics.

Similar questions