Hi, Anybody could tell me What is the 3rd Largest Number in
the series..Thanks in Advance..

Answers were Sorted based on User's Feedback



Hi, Anybody could tell me What is the 3rd Largest Number in the series..Thanks in Advance....

Answer / saket bharti

a=Array(-1,0,23,-12,98,-300)

Dim temp,i,j

For j=0 to UBound(a)-1

For i=0 to UBound(a)-1

If a(i)<a(i+1) then

temp=a(i+1)

a(i+1)=a(i)

a(i)=temp

End If

Next

Next

Msgbox a(2)

Is This Answer Correct ?    4 Yes 1 No

Hi, Anybody could tell me What is the 3rd Largest Number in the series..Thanks in Advance....

Answer / pushkar1206

a=array(1,22,3,40,12)
For i=0 to ubound(a)
For j=0 to ubound(a)
If a(i)>a(j) then
temp=a(i)
a(i)=a(j)
a(j)=temp
end if
Next
Next
print a(2)

Is This Answer Correct ?    1 Yes 0 No

Hi, Anybody could tell me What is the 3rd Largest Number in the series..Thanks in Advance....

Answer / anwar basha

dim temp,i,j
a=array(5,3,7,9,2,...)

for i=0 to ubound(a)-1
for j=i+1 to ubound(a)
if a(i)>a(j) then
temp=a(i)
a(i)=a(j)
a(j)=temp
end if
next
next
k=ubound(a)-2
msgbox a(k)

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.

1 Answers  


please can you help me to get a code of flames using a visual basic 6

0 Answers  


How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?

10 Answers   Cap Gemini, CTS,


Mention when to use function procedures and what are its characteristics?

1 Answers  


What are class variables?

1 Answers  


reverse the string without using reverse string?

2 Answers   CSS Corp,


Which data type/types are supported by vbscript language and what are their specialties?

1 Answers  


Explain about scrrun.dll?

1 Answers  


What methods are used to create text files and open text files in the vbscript language?

1 Answers  


Which operator is used for fetching the modulus of the 2 numbers in the vbscript language?

1 Answers  


Hi, Can anyone please send me vb script examples to practice vb and also material to learn vb scripting in QTP? my email id : hareen_11@yahoo.com

1 Answers  


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

1 Answers   CybAge,


Categories