factorial function, product of all positive integers less than or equal to n
function factorial input Integer n "input value"; output Integer y "output value"; end factorial;