How to get 120 using 5 zeroes, you can use any operator(+,
*, /...) in qtp.
Answer Posted / testengineer
Option Explicit
Dim temp,Factorial,i,j,k,x
temp=0
Factorial = 1
For i=1 to 5 step 1
x= Inputbox ("Enter a No. :") '(Enter Zero for
Five Times)
For j=x to 1 Step -1
Factorial=Factorial*j
Next
temp = temp+Factorial
Next
For k=temp to 1 Step -1
Factorial=Factorial*k
Next
Msgbox Factorial
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
what is the use of QCUtil? explain with one example?
How to Import data from a file (file is on the desktop) to the data table
What is vbscript?
Which keyword is used to declare a variable in the vbscript language?
Mention characteristics of sub procedures?
Which conditional statement is the most convenient one to use in the case of multiple conditions in the vbscript language?
How will you get a combined string from array of string in vbscript?
how to increase the values in text box in a given text box increament by two values by clicking on button
How are values assigned to the variables in the vbscript language?
Mention what is select case statement?
Which function is used in the vbscript language to convert the specified expression into a date type value?
Explain the arrays in vb script?
Mention the environments where vbscript could be run?
write a function to read the items from combobox of Flight reservation & save in excel (QTP)??
What purpose does ‘on error resume next’ serves?