{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lab14f - If a number is specified that is out of range a-1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
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.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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 © A+ Computer Science – Arrays - www.apluscompsci.com Computer Science I Lab 14F – FIBONACCI Lab Value - 120 Files Needed :: Fibonacci.java Lab14f.java...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online