Switch to full style
ASP/ASP.net examples
Post a reply

recursively calculating factorial

Sun Apr 03, 2011 9:41 pm

Factorial function declaration example.
Code:
<% 
'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))
%>




Post a reply
  Related Posts  to : recursively calculating factorial
 Calculating image Gradient     -  
 Merge two or more arrays recursively     -  
 solving fibonacci sequence recursively     -  
 calculating time required to execute function     -  
 Get Factorial using Java     -  
 Fibonacci vs factorial     -  
 factorial number Using Recursion     -  

Topic Tags

ASP Basics