print the array values in ascending order?

Answer Posted / rajanikanth

Option Explicit
Dim a,i,b,j,temp
a=Array(30,70,10,60,90,20,50,80)

For i=0 To UBound(a)

For j=0 To UBound(a)

If StrComp(a(i),a(j),1)<0 Then
temp=a(i)
a(i)=a(j)
a(j)=temp
End If
Next
Next
For i=0 To UBound(a)
MsgBox a(i)
Next

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about .wsf files?

618


What is the event handling in vbscript?

561


What are the 2 ways to pass a value to the function?

510


Explain different types of segment?

565


Mention the rules for using option explicit statement?

480






Explain the scope of the variables using dim, public, and private keywords respectively.

715


Is VB Script Case sensitive or Case insensitive?

631


Hai this is sheik, i want to learn VB scripts for web application pls guide me what are all basic things need to know to learn VB scripts in web application.

1432


Explain the arrays in vb script?

583


In what way program "hello world" you can write in vbscript?

643


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

1226


How to open a file. What is the perpose of true and false mode there?

605


did any one attended interview in applabs if you had gone through plz tell me the procedure

1852


What are the environments supported by vbscript language?

498


What is dictionary object in vbscript? Explain?

623