write a vb script to calculate factorial of a number?

Answer Posted / arvind singh

a = InputBox("Enter a no to calculate factorial for")
Result = 1
Do While a > 0
Result = Result*(a)
a = a-1
Loop
MsgBox Result

Is This Answer Correct ?    8 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between vb debugger and the script debugger?

833


What is event handling in vbscript?

836


We have 1 web page with names column. I am giving the Service Providers1,2,3.... @ that time dynamically some no of names are displaying in the webpage and The Pop up windows are opening(No.of Pop Up windows=No.of Names). The names may be diffar for each and every Service Provders (Dynamically) How can we handle the Dynamic values?

1987


what is resorceallocation

1986


Explain about filter expression?

797


Is VB Script Case sensitive or Case insensitive?

868


How to delete a cookie using vbscript?

834


What is the difference between function and procedure?

904


Mention how to assign a date value to a variable?

847


Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.

1909


How are values assigned to string type and numeric type variables?

780


Explain about tristate constants in vbscript?

848


what is inner join? what is outer join? what is a constraint? tell me about rdbms? tell me about acid properties?

1662


What is the difference between do until loop and do while loop?

826


Explain vbscript in detail?

843