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
How are values assigned to string type and numeric type variables?
filter the array values without using filter function?
Compare java script and vb script?
how to write codings in QTP using vb script. please help me. i am new to QTP. it is easy or very much tough. please tell me
how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.
Mention what are the rules to name variable in vbscript?
What is difference between vbscript and vba?
Description.Create
What is the difference between a dictionary and an array?
Explain about arrays in vb script?
hi Set myobj=Description.Create() myobj("type").value="submit" myobj("name").value="google search" myobj("html tag").value="button" browser("title:=google").page("title:=google").webButton (myobj).Click i was running above code in one weak back it was working fine i got result,again i opened after few days ,again i was trying to run the code it shows run time error in last line of my code ,why ?pls answer my question?
What are class events?
what is event handling?
What are the different types of loops available in the vbscript language?
what is the standards used for writing the script in QTP