Defficient Number 2015/02/25 14864 def defficient(n) sumOfFactors=0 for i in 1..n if n%i==0 factor=i sumOfFactors += factor end end if sumOfFactors<2*n puts "The given number is a deficient number" else puts "It's not a deficient number" end end