repl.it
@FuyuWinter/

Prime Number

Python 2.7

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
n = input("Number: ")

for p in range(2, n+1):
  for x in range(2, p):
    if p % x == 0:
      break
  else:
    print p,
print("\r")
Fetching token
?