Writing Recursive Functions

How to Write Recursive Functions

A recursive procedure is one that calls itself. Example is as follows –
The following procedure uses recursion to calculate the factorial of its original argument.
Function factorial(ByVal n As Integer) As Integer
If n <= 1 Then
Return 1
Else
Return factorial(n – 1) * n
End If
End Function

Comments

Popular posts from this blog

Testing Webservice with SoapUI Having Windows Authentication

How to Uncheck All checkboxes Using Cucumber/Capybara