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 difference between do until loop and do while loop?
can anyone tell me the procedure of interview held in applabs
What is the purpose of on error resume next statement?
Is vbscript language a case-sensitive language and what does it mean?
Develop a parameterized action that accomplishes the following a. Launch a browser of users choice ( example : IE, chrome etc) b. Open up a search engine (Google, Bing etc) c. Perform a search d. Click a particular link depending on the user’s choice ( 1st , 2nd or third link)
What aspects of vbscript make it safe so that a web page using vbscript cannot destroy or corrupt information on a user's computer?
Difference between dim,public and private variables in vb script?
When does ‘on click of button’ event gets triggered in the vbscript language?
If else for do while select in vb script?
What are subprocedures in vbscript?
What is the difference between javascript and vbscript?
What are the 2 ways in which a variable can be declared in the vbscript language?
Mention how to access array data?
What is Procedure or Subroutine in VB Script?
Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.