Skip to main content
Inspiring
May 30, 2024 5:34 AM UTC
Question

Fibonacci series

Hi All ,

I am trying to get fibonacci series with the following rule .But getting unexpected output .

Let me know where am I doing it wrong .

TIA

7 replies

jayaprakashr0001
Participating Frequently
May 30, 2024 6:05 AM UTC

Hi [mention:23b56b00ee924454b087103e2086677d:e9ed411860ed4f2ba0265705b8793d05] ,

In appending values you used , add the values so you will get the Fibonacci series output.

a!localVariables( 
  append(
    ri!list, 
    reverse(ri!list)[1] + reverse(ri!list)[2]),
  
)

Inspiring
May 30, 2024 6:08 AM UTC

Thanks .Working now 

Brainy
Jun 13, 2024 1:03 PM UTC

[mention:23b56b00ee924454b087103e2086677d:e9ed411860ed4f2ba0265705b8793d05] and [mention:44bed26f1d96482687e4003414c7d8ec:e9ed411860ed4f2ba0265705b8793d05]  What is the use of 'value' input (value_)?

Inspiring
Jun 15, 2024 2:05 AM UTC

It will store  the result of each iteration  and append to the list