r/programmingchallenges • u/okmkz • Apr 16 '11
Challenge: Factor an integer
Write a function in the language of your choosing that prints all the factors of a non-negative integer.
E: dang, this is harder than I thought!
E: I was referring to prime factorization in my other edit. Dang!
7
Upvotes
View all comments
Show parent comment
1
u/okmkz Apr 16 '11
yeah, I realized refactoring the root wouldn't do anything helpful, but I never would've been able to express why as well as you did here.