RosettaCodeData/Task/Fibonacci-sequence/Harbour/fibonacci-sequence-2.harbour

10 lines
161 B
Text
Raw Permalink Normal View History

2016-12-05 23:44:36 +01:00
#include "harbour.ch"
Function fibb(n)
local fnow:=0, fnext:=1, tempf
while (--n>0)
tempf:=fnow+fnext
fnow:=fnext
fnext:=tempf
end while
return(fnext)