ProAnswers.org

Factorial of a number in visual basic 6?

WAP
Factorial of a number in visual basic 6?

dim num as integer, factorial as single
num=inputbox(“enter a number”)
factorial = 1
for x = 1 to num
factorial = factorial * x
next x
print"factorial is" ; factorial