function result = factorial_recursive(n)
% input: a number n > 0
% output: factorial of the number n
% This function is implemented in an recursive way (i.e. , the function calls
% *itself* with a smaller input)

if (n <= 0)
   result = 1;
else
   result = n * factorial_recursive(n-1);
end
