changeset 894 | 02ef5c3abc51 |
parent 893 | 54a483a33763 |
child 895 | 2f5a87ecdc81 |
--- a/solution/cw2/fib.while Fri Oct 28 09:08:13 2022 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -write "Fib"; -read n; -minus1 := 1; -minus2 := 0; -while n > 0 do { - temp := minus2; - minus2 := minus1 + minus2; - minus1 := temp; - n := n - 1 -}; -write "Result: "; -write minus2 -