Imports System
Public Module Module1
Public Sub Main()
Dim x as integer
console.writeline("Enter Any number!")
x= Console.readline()
Console.WriteLine(func(x))
End Sub
Function func(n as integer) as Integer 'function declration
if (n=1) then
return 1
else
return (n*func(n-1))
End if
end Function
End Module