How to get 120 using 5 zeroes, you can use any operator(+,
*, /...) in qtp.

Answers were Sorted based on User's Feedback



How to get 120 using 5 zeroes, you can use any operator(+, *, /...) in qtp...

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

How to get 120 using 5 zeroes, you can use any operator(+, *, /...) in qtp...

Answer / 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

More VB Script Interview Questions

Explain about tristate constants?

0 Answers  


In qtp, how to use XML files for framework. if the XML files are more Efficient than Excel files?

1 Answers  


compare the string without using stringcomp function?

1 Answers   CSS Corp,


How to write VB Script for selecting a particular row in a WebTable?

1 Answers   Patni,


Mention what is the difference between vbscript and vba?

0 Answers  






HOW TO OPEN NEW TAB USING VB SCRIPT IN QTP?

1 Answers   TCS,


1. How to handle object implementation change in DP for Ex: i have login page with username,pasword (editboxes),login,cancel(buttons). Here i written DP code for login page with the help properties. My questions: 1.If properites are changing dynamically i will do (i want code for that) 2.if objects are changed dynamcally i will do (i wnat code for that)

0 Answers   iFlex,


How to open browser in vb script?

0 Answers  


which is the best institute in banglaore for software testing?

1 Answers  


How to delete a cookie using vbscript?

0 Answers  


Have any one know about Test Complete 6, please let me know. If any one have good material regarding Test Complete 6, Please send to my mail id: cns.praveen@gmail.com

1 Answers  


What is purpose of scripting.filesystemobject class in vbscript?

0 Answers  


Categories