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 |
Explain about vb script?
Mention the environments where vbscript could be run?
How to write a VBscript for web page performance test i need a code send if any knows the code If any knows VBScript book plz send to me the link to my mail plz
Which operator can be used to change the value of the operand or change the state of the condition?
How will you convert a string to upper case string using vbscript?
What is the difference between for loop and while loop?
hai all.iam chandu..please let me know how to test a link in QTP when it is changing at run time..and what property we should take while we r using descriptive programming for a link..
How will you reverse a string in vbscript?
i need to login to my yahoo accoutnt using VB Script, automating the operation of webobjects, even launching of IE. How?
How to assign a numeric value to a variable?
Could Anybody tell me VBScript for Check if a given number is Prime number-Don't use any Built- in Functions Boolean/int is Prime(int number).. Thanks in advance.
How to open excel in vb script?