'Factorial of number
Function factorial(no)
Dim fact
fact=1
For i=1 to no
fact=fact*I
Next
factorial=fact
End Function
num=inputbox("Enter number")
msgbox "Factorial is" &factorial(num)
Function factorial(no)
Dim fact
fact=1
For i=1 to no
fact=fact*I
Next
factorial=fact
End Function
num=inputbox("Enter number")
msgbox "Factorial is" &factorial(num)
No comments:
Post a Comment