Module Module1
    Function factorial(ByVal N As Integer) As Integer
        If N = 0 Then
            Return 1
        Else
            Return N * factorial(N - 1)
        End If
    End Function
    Sub Main()
        Console.WriteLine(factorial(3))
        Console.ReadLine()
    End Sub

End Module
