num = None
def primecheck(n):
count = 0
for i in range(1,n+1):
if n%i == 0:
count+=1
if count == 2:
return 1
else:
return 0
while(num!=0):
num = int(input("Enter an integer (press 0 to exit):"))
if primecheck(num) == 1:
print(num,"is a prime number.")
else:
print(num,"is not a prime number.")