Factorial Number Using Functions Home » ASP » VBScript Branching Logic » Functions <%@Language=VBScript%> <%Option Explicit %> <HTML> <HEAD> <TITLE>Using Functions</TITLE> </HEAD> <BODY> <% Dim inum Function Fact(inum) Dim Counter,temp temp=1 For Counter=1 to inum temp = temp * Counter Next Fact=temp End Function %> </BODY> </HTML> <% Dim j j=Fact(5) Response.write("<BR><B>Factorial : </B>"&j) %> Output Factorial : 120 Read more » Share on Facebook Share on Twitter Share on Google Plus RELATED POSTS