Search⌘ K

Solution: Finding Divisors

Go over the implementation of finding all the divisors of a number.

We'll cover the following...

Solution

Ruby 3.1.2
check = nil
(1..input).each do |x|
check = input % x
if check == 0
array << x
end
end
Did you find this helpful?

Explanation

  • ...