Lab Goal : The lab was designed to teach you how to use arrays to simplify solving more complex problems. Lab Description : Generate a Fibonacci sequence. Each number in the Fibonacci sequence is the...


Lab Goal : The lab was designed to teach you how to use arrays to simplify solving more complex

problems.

Lab Description : Generate a Fibonacci sequence. Each number in the Fibonacci sequence is the

sum of the two preceding numbers in the sequence. The first two numbers in the sequence are both 1. The

third number is 2 , the fourth number is 3, the fifth number is 5, and the sixth number is 8. The program should

be able to return a specified number in the fibo sequence. If a number is specified that is out of range, a -1

should be returned.
Sample Data : set size to 50
1
2
3
4
5
6
11
16
21
31
41
46
set size to 1
1
set size to 2
1
2
11
Sample Output : 1
1
2
3
5
8
89
987
10946
1346269
165580141
1836311903
1
1
1
-1




Put this in java



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here