% This is the solution to problem 3 for the Sep 20-21 Lab session.
% Print all primes from 2 to N.  Call function aPrime.

N = input('Input N: ');

for i=2:N                % Loops over numbers from 2 to N
    if aPrime(i)==1
        fprintf('%d\n',i);
    end
end