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

Differentiate javascript and vbscript?

0 Answers  


For a webbased application:- what should be code in expert veiw, for retrieving a single column name "username" from a server and checking whether exported "username" from datatable doesn't exist in server. suppose i have saved in excelsheet a username="gayatri" , which is exported, then checked for whether this username "gayatri" exist in server database or not ? if exist then allow to enter new username, which should be again checked for in loop , or else come out of loop and enter a distinct "username". plz let me have this answer in my id gayatrisahooin@hotmail.com

0 Answers  


How to select a value from a list box by using Selenium web-driver?

2 Answers   HCL,


write a vb script create 5 folders test1 test2 test3 test4 test5

3 Answers  


Explain few date functions in vbscript?

0 Answers  






What are the naming conventions while declaring a variable in the vbscript language?

0 Answers  


How to create a function in vbscript?

0 Answers  


My Salary is 65000. How Much TDS I have to pay

0 Answers  


what is event handling?

0 Answers  


Which is the default Data types in VBScript?

7 Answers   AppLabs,


How to Convert Hex color code to color name in VB Script?

0 Answers  


hi Set myobj=Description.Create() myobj("type").value="submit" myobj("name").value="google search" myobj("html tag").value="button" browser("title:=google").page("title:=google").webButton (myobj).Click i was running above code in one weak back it was working fine i got result,again i opened after few days ,again i was trying to run the code it shows run time error in last line of my code ,why ?pls answer my question?

0 Answers  


Categories