Uncategorized

# The Fibonacci sequence begins with O and then 1 follows. All subsequent values are the sum of the previous two,

The Fibonacci sequence begins with O and then 1 follows. All subsequent values are the sum of the previous two, for example: 0,1,1,2,3, 5, 8, 13. Complete the fibonacci0 method, which has an index. n as parameter and returns the nth value in the sequence. Any negative index values should retum-1 Ex: If the input is 7 the output is fibonacci (7) is 13 Note: Use a for loop and DO NOT Use recursion LAR ACTIVITY 6.31.1LAB Fibonacci sequence (EC) 0” Type your code here. 13 public static void main(string) Scanners Scanner(Systein Phone Sequence progresibonaccigence) Int start starts System. out. println(“Pomacek. start.) program. ibonace(start) 14 1