% Solution to problem 1 for the Sep 20-21 Lab session.
% Print F(n), F(n)+1, F(n)+2, ..., F(n+1)-1, F(n+1) using WHILE loop.

N = input('Input N: ');
tempValue1 = 1;
tempValue2 = 1;
% Add the necessary code here

i=1;
% After this loop is executed, tempValue1 would correspond to F_i, and
% tempValue2 would correspond to F_i+1. We loop until we get F_n and
% F_n+1.
while (i<N)
    tempValue3 = tempValue1 + tempValue2;
    tempValue1 = tempValue2;
    tempValue2 = tempValue3;
    i = i+1;
end

% This prints the numbers from tempValue1 to tempValue2 inclusive.
while tempValue1<=tempValue2
    fprintf('%d\n',tempValue1);
    tempValue1 = tempValue1 +1;
end

    