#!/usr/bin/env ruby

require './lib/divisors'

p divisors(12) # => [1, 2, 3, 4, 6, 12]

puts divisors(12)
# =>
# 1
# 2
# 3
# 4
# 6
# 12

print divisors(12), "\n" # => [1, 2, 3, 4, 6, 12]

print divisors(-1), "\n" # => [1]
print divisors(0), "\n" # => []
print divisors(1.1), "\n" # => []



(1..20).each { |n| print divisors(n), "\n" }
# =>
# [1]
# [1, 2]
# [1, 3]
# [1, 2, 4]
# [1, 5]
# [1, 2, 3, 6]
# [1, 7]
# [1, 2, 4, 8]
# [1, 3, 9]
# [1, 2, 5, 10]
# [1, 11]
# [1, 2, 3, 4, 6, 12]
# [1, 13]
# [1, 2, 7, 14]
# [1, 3, 5, 15]
# [1, 2, 4, 8, 16]
# [1, 17]
# [1, 2, 3, 6, 9, 18]
# [1, 19]
# [1, 2, 4, 5, 10, 20]
