SL8

function fact=factor(n)
    fact=1
    for k=1:n
        fact=k*fact
    end
endfunction




-->factor(5)
 ans  =

    120. 

ความคิดเห็น