How to get 120 using 5 zeroes, you can use any operator(+,
*, /...) in qtp.
Answers were Sorted based on User's Feedback
Answer / sureshkumar
We can get 120 using factorial, i.e
Factorial (0) = 1 so that
(0! + 0! + 0! + 0! + 0!)! = 5! => 120
| Is This Answer Correct ? | 7 Yes | 1 No |
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 |
How can I write HTML text to the window in VB Script?
How can you destroy an object in vbscript?
How do you get the value of a combo box in Javascript?
what is the object hyrarchy in QTP for a web based application
How to find a latest file from any folder
how does vb script help in web page designing? explain with example.
How to create a cookie using vbscript?
write a vb script to create a folder?
How to find the font in qtp. Scenario:After entering the username and passwd you will be navigate into the "welcome:Username" page.Now I want to extarct font for this message.
Can u describe what kind of testing are for OTC derivates by banks.
What are the differences between Visual Basic, VBA and VBScript? When would it be appropriate to use one as opposed to another?
Suppose by navigation I went from 1 st page to 5 page ,so Write a generic script for coming from any page to the 1st page and by executing where the page may be it will come to 1st page