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
Which operator is used for fetching the modulus of the 2 numbers in the vbscript language?
How to throw an error in vbscript?
By default in vbscript the arguments passed to functions and subroutines are by reference or by value?
How will you get the last occurrence of one string within another string using vbscript?
What is the scope of a constant declared using public?
Why is the use of exit do or exit for statements within loops discouraged?
What are the differences between sub procedures and function procedures?
What is the use of the instr function?
When to use function procedures and what are its characteristics?
What are the environments supported by vbscript language?
how to automatically update the sql server2005 database records when insert in vb6?
Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?
How to find the font in qtp. Scenario:After entering the username and passwd you will be navigate into the "welcome:Username" page.Now I want to extarct font for this message.
Explain the .wsf files?
I am working on QTP, got struck in one place.. In my application depending upon configuration WebEdit count is increasing/ decreasing.. how to get these webedits..