% Determine whether integer n is prime, n>1.

n= input('Enter an integer >1: ');

divisor= 2;
while ( rem(n,divisor)~=0 )
	divisor= divisor + 1;
end
if (divisor==n)
	fprintf('%d is prime\n', n)
else
	fprintf('%d is composite\n', n)
end
