>What about a purely iterative solution, that does not need the excess
>memory, and is not logically limited in the number of values to display?
That's fine for just printing the sequence. The array is more open to extension though. Let's say you want to write fib(x) where x is the number and the function returns

. With the array you can do this:
int fib ( int x )
{
static const int max = 25;
static int n = 2;
static int fibArray[max] = {1,1};
while ( n < x ) {
fibArray[n] = fibArray[n - 1] + fibArray[n - 2];
++n;
}
return fibArray[x];
}
At the (minor, in this case) cost of extra storage, you avoid recalculating parts of the sequence that you've already calculated. That's the principle behind the dynamic recursive algorithm.