subject

Java 40 points!
The Fibonacci sequence is the sequence of numbers:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, …

The next number is found by adding up the two numbers before it.

For example, the 2 is found by adding the two numbers before it (1+1). The 3 is found by adding the two numbers before it (1+2). The 5 is found by adding the two numbers before it (2+3), and so on! Each number in the sequence is called a term.

In this exercise, you will need to:

Create the array int[] sequence that holds the values of the first 15 terms of the Fibonacci sequence. Think carefully about what happens to the index when iterating through the loop to fill this array. Read the Fibonacci description above to help!
Then print out the sequence of numbers separated by a space.
Finally, create a method findIndex to find the index of the term 55.
Sample output:

Fibonacci sequence up to 15 terms:
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377
Index position of 55 is: 10
Hint: You will need to use several loops: One to fill the array, one to print the array, and one to traverse the array!

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:00
Analyze the following code. int x = 1; while (0 < x) & & (x < 100) system.out.println(x++); a. the loop runs forever. b. the code does not compile because the loop body is not in the braces. c. the code does not compile because (0 < x) & & (x < 100) is not enclosed in a pair of parentheses. d. the numbers 1 to 99 are displayed. e. the numbers 2 to 100 are displayed.
Answers: 3
question
Computers and Technology, 23.06.2019 15:00
Idon’t understand the double8 coding problem. it is java
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Enzo’s balance sheet for the month of july is shown. enzo’s balance sheet (july 2013) assets liabilities cash $600 credit card $4,000 investments $500 student loan $2,500 house $120,000 mortgage $80,000 car $6,000 car loan $2,000 total $127,100 total $88,500 which expression finds enzo’s net worth?
Answers: 1
question
Computers and Technology, 24.06.2019 23:00
People should never use telepresence when virtually meeting with a group of co-workers. true false
Answers: 1
You know the right answer?
Java 40 points!
The Fibonacci sequence is the sequence of numbers:

0, 1, 1, 2, 3,...
Questions
question
History, 27.09.2019 00:30
question
Mathematics, 27.09.2019 00:30
question
Social Studies, 27.09.2019 00:30
Questions on the website: 13722359