while True:
num = int(input("정수(>=2)를 입력하세요:"))
if num <= 0:
print("프로그램을 종료합니다.")
break
if 0 < num < 2:
print("잘못 입력하였습니다.")
else:
a = 0
for i in range(2,num):
if num % i == 0:
a = 1
if a == 1
print(f"{num}는 소수가 아닙니다.")
else:
print(f"{num}는 소수입니다.")
To embed this project on your website, copy the following code and paste it into your website's HTML: