I need a For Next loop that will print the first 10 Fibonacci numbers:(1,1,2,3,5,8,13,21,34,55)
kazooie21
Printable View
I need a For Next loop that will print the first 10 Fibonacci numbers:(1,1,2,3,5,8,13,21,34,55)
kazooie21
This was fun to write :)
Dim i as Integer
Dim X as Integer
Dim Y as Integer
Dim Z as Integer
X = 0
Y = 0
Z = 1
for i = 1 to 10
Debug.print Z
X = Y
Y = Z
Z = X + Y
next
Brewguru99