BJ4
#判斷是否質數
num = int(input('請輸入任意整數來判斷是否質數: '))
if num > 1:
for i in range(2, num):
if (num % i) == 0:
print(num,'不是質數')
print(i,'乘以', num//i,'是',num)
break
else:
print(num, '是質數')
else:
print(num, '是質數')