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


Please Help Members By Posting Answers For Below Questions

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

543


can anyone tell me the procedure of interview held in applabs

1751


What is the purpose of on error resume next statement?

577


Is vbscript language a case-sensitive language and what does it mean?

546


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)

1409






What aspects of vbscript make it safe so that a web page using vbscript cannot destroy or corrupt information on a user's computer?

579


Difference between dim,public and private variables in vb script?

527


When does ‘on click of button’ event gets triggered in the vbscript language?

547


If else for do while select in vb script?

644


What are subprocedures in vbscript?

662


What is the difference between javascript and vbscript?

534


What are the 2 ways in which a variable can be declared in the vbscript language?

564


Mention how to access array data?

513


What is Procedure or Subroutine in VB Script?

604


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

1623