Fibonacci numbers in Smalltalk
Example for versions
gst 3.1
This example uses iterative definition of Fibonacci numbers,.
a1 := 0.
a2 := 1.
0 to: 15 do: [ :i |
a2 display.
t := a1 + a2.
a1 := a2.
a2 := t.
', ' display
]
'...' displayNl.
Comments
]]>blog comments powered by Disqus
]]>