function fact(n)
    if n=0 and n=1 then
        fact=1
    else
        fact=fact*fact(n-1)
end fuction
Function fact(n)
    If n < 2 Then
        fact = 1
    Else
        fact = n * fact(n-1)
    End If
End Function
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.