changeset 93 | 4794759139ea |
parent 84 | 719fd738d2a0 |
child 147 | 4725bba8ef26 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/progs/fib.while Sat Jun 15 09:23:18 2013 -0400 @@ -0,0 +1,15 @@ +/* Fibonacci Program + input: n +*/ + +n := 19; +minus1 := 0; +minus2 := 1; +while n > 0 do { + temp := minus2; + minus2 := minus1 + minus2; + minus1 := temp; + n := n - 1 +}; +write minus2 +