%this function will determine if an input number is prime
function prime = isthisprime(x)
prime = true;
factor = 2;

while factor < x/2
    if rem(x,2) == 0
        prime = false;
        break
    end
    factor = factor + 1;
end

if prime == false
    disp([num2str(x) ' is not prime'])
else
    disp([num2str(x) ' is prime'])
end

