4th_to_print_prime_no
n1=int(input("Enter lowest interval: "))
n2=int(input("Enter highest interval: "))
for num in range(n1,n2+1):
if num > 1:#all prime numbers are greater than 1
for i in range(2,num):
if num%i==0:
break
else:
print(num)
Comments
Post a Comment