A complete core-language exercise
The Fibonacci regression program computes the sequence iteratively. It keeps the two latest values in 'a' and 'b', computes their sum, shifts the pair, and repeats 20 times.
aayu
let a = 0
let b = 1
let i = 0
while i < 20
let temp = a + b
a = b
b = temp
i = i + 1
end
print(a)Expected result: 6765. This version uses a loop and does not demonstrate recursive function calls. The separate regression example checks the result in an if/else.