kazooie21
November 21st, 1999, 09:33 PM
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
kazooie21
|
Click to See Complete Forum and Search --> : HELP! Need For Next loop for Fibonacci! kazooie21 November 21st, 1999, 09:33 PM 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 BrewGuru99 November 22nd, 1999, 07:48 PM 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 codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |