Quantcast
Channel: Answers for "Fibonacci Sequence Calculation"
Viewing all articles
Browse latest Browse all 8

Answer by Tim

$
0
0
This is the easiest way for me. Simply plug in your values into the parameters. I started with 1 and 1 like your example. DELCARE @Y INT DECLARE @Z INT DECLARE @FIB INT SET @Y = 1 SET @Z = 1 SET @FIB = 0 PRINT @Y PRINT @Z WHILE @FIB < 2000 BEGIN SET @FIB = @Y + @Z PRINT @FIB SET @Y = @Z SET @Z = @FIB END

Viewing all articles
Browse latest Browse all 8

Trending Articles