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

Write program for identifyig duplicates in flight Departing from and Arriving in mercury tours(web application).

1441


How can you destroy an object in vbscript?

638


What is the use of the date function in the vbscript language?

560


wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......

1487


Mention what is the main difference between function and sub-procedure?

543






We have 1 web page with names column. I am giving the Service Providers1,2,3.... @ that time dynamically some no of names are displaying in the webpage and The Pop up windows are opening(No.of Pop Up windows=No.of Names). The names may be diffar for each and every Service Provders (Dynamically) How can we handle the Dynamic values?

1750


How will you convert a given number to long in vbscript?

489


I have attended Anovatek Software QTP interview. They will give us computer and one web based application with QTP. We have to automate some records (already updated records or new records) using QTP Data driven testing. But we should use for loop? Can any one know how to do data driven testing using For loop?

1544


Which object provide information about a single runtime error in a vbscript?

598


Set srchobj=Description.Create() srchobj("type").value="text" srchobj("name").value="q" srchobj("html tag").value="input" browser("micclass:=google").Page("micclass:=google").webedit (srchobj).Set "qtp" what's wrong in my code pls tell me ? the above code working fine and i got my result pass,now i am trying to run the program it shows general run time error why?pls help me i am in learning stage ?

1550


Mention what is the use of option explicit in vbscript?

544


how to comvert 120 into one hunderd twenty rupees only and vice varsa

1799


Which event is triggered when mouse focus comes out of an element in the vbscript language?

507


If else for do while select in vb script?

638


Explain sga memory structures?

577