Menu

[r376]: / XFIB.MPL  Maximize  Restore  History

Download this file

12 lines (6 with data), 166 Bytes

// SIMPLE FIBONACCI SEQUENCE VIA RECURSION

##LIBHDR

FIB(X) X>1 ? FIB(X-1)+FIB(X-2) : X

.(;X) [
  X=-1; ++X<25 @ WRITEF("FIB(%I2) = %U5*N",X,FIB(X))
]

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.