Algoritma Deret Fibonacci secara Iteratif
function Fibonacci(n:integer) ? integer; Deklarasi : a, b, c, i : integer; Algoritma : if n = 0 then return 0 else if n = 1 then return 1 else a ? 0 b ? 1 i ? 2 while i<=n do c ? a +b a ? b b ? c i ? i+1 return c; endwhile endif endif Program Fibonacci1 Delarasi : i, n:integer Algoritma : read(n) for i:= 0 to n-1 do write(Fibonacci(i)) endfor