Guest User

Untitled

a guest
May 21st, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. print("Displaying Primes From 2 Until X (X is excluded)")
  2.  
  3. n=int(input("Enter X Value : "))
  4. a=2
  5. if n<=1:
  6. n=int(input("Enter Another X Value : "))
  7. for a in range(2, n):
  8. for i in range(2, a):
  9. if a % i == 0:
  10. break
  11. else:
  12. print(a)
Add Comment
Please, Sign In to add comment