function v = faktorialis(n)
v=1;
while (n>1)
    v=v*n;
    n=n-1;
    endwhile
endfunction
