<% 'Factorial function. Function factorialValue(ByVal intValue) If intValue<= 1 Then factorialValue= 1 Else 'recursive call . factorialValue= intValue* factorialValue(intValue- 1) End If End Function %>
Example :
Code:
<% Response.Write ("Factorial of 7 = " & factorialValue(7)) %>
_________________ M. S. Rakha, Ph.D. Queen's University Canada