Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def find_factors(numbers)
- factors = []
- x = 0
- while x < numbers do
- if (x % numbers == 0)
- factors.push(x)
- end
- x += 1
- puts x
- end
- puts "THIS IS X: #{x}"
- puts "THIS IS FACTORS: #{factors}"
- end
- find_factors(20)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement