合数

def com(n)
  for i in 1..(n-1)
    if n%i==0
      factor=i
    end
  end
  
  if factor>1
    puts "The Number is a Composite Number!"
    
  else
    puts "This is not a Composite Number!"
  end
  
end

编程技巧