bigyihsuan

Python Factoring Program (3.4.0)

Feb 23rd, 2016
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. x = int(input("Number to factor:"))
  2. y = 1
  3. for y in range(y, x):
  4.     if x % y == 0:
  5.         if y >= x/y:
  6.             break
  7.         else:
  8.             print(x/y, y)
Advertisement
Add Comment
Please, Sign In to add comment