You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
379 B
Plaintext

<%
Function Factorial(ByVal intNumber)
If intNumber <= 1 Then
Factorial = 1
Else
Factorial = intNumber * Factorial(intNumber - 1)
End If
End Function
%>
And here we test the function with 2 values 5 and then 10
<%
Response.Write ("Factorial of 5 is " & Factorial(5))
Response.Write ("<br>")
Response.Write ("Factorial of 7 is " & Factorial(7))
%>