The Fibonacci Sequence is a set of numbers formed as follows: the first and second terms are both 1 and each succeeding term is formed by adding the two preceding terms. So the sequence starts 1, 1, 2, 3, 5, 8, … Write a program that displays the first 20 Fibonacci numbers. Your program will calculate the sequence in a method and return the result in an array. Enhance your program by prompting the user for the number of terms (you must decide on a reasonable maximum).
limelio/Fibonacci
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|