I am trying to figure out to produce the first n digits of the Fibonacci sequence but in the form of a Do and While Loop.
I understand that we can define the Fibonacci sequence in the form of a recursive function
where
f[1] = 1 ; f[2] = 1;
f[n_] := f[n] = f[n - 1] + f[n - 2]
How do I put this into a do and while loop to yield the first n terms of the sequence?