Sun Apr 03, 2011 9:41 pm
<%
'Factorial function.
Function factorialValue(ByVal intValue)
If intValue<= 1 Then
factorialValue= 1
Else
'recursive call .
factorialValue= intValue* factorialValue(intValue- 1)
End If
End Function
%>
<%
Response.Write ("Factorial of 7 = " & factorialValue(7))
%>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.