RosettaCodeData/Task/Fibonacci-sequence/TI-SR-56/fibonacci-sequence.tisr56

8 lines
276 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
STO 0 // Nth term requested := User input
1 STO 1 // Last term := 1
0 // Initial value: 0
+ *EXC 1 = // Calculate next term.
*dsz 0 6 // Loop while R0 positive
R/S // Done, show answer
GTO 0 6 // If user hits R/S calculate next term