Computer Science, asked by SharanyaBanerjee, 9 months ago

WAP to print all the prime numbers in a range from m to n where m <n and

both are positive integers.​

Answers

Answered by lagu786
0

Explanation:

m = int(input("enter lower range"))

n = int(input("enter upper range"))

if m<n and m>0 and n>0 :

for num in range (m, n+1)

if num>1 :

for i in range (2,num):

if (num%i) == 0:

break

else :

print("this is the prime no. ")

print(num)

else :

print("invalid input please give a valid input")

This above code is written in python

Similar questions