I am a ruby newbie and have a problem with getting the code below to work
def factorial(n)
if n == 0
1
else
n * factorial(n-1)
end
end
puts factorial(numbers)
I keep getting the error message can't convert Fixnum into Array (TypeError) in `factorial'. Anyone able to help me with answer to what I am doing wrong in this case? Thanks in advance