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
Explain sga memory structures?
Explain the .wsf files?
Mention the rules for using option explicit statement?
why variable name should not exceed 255 characters?
How to pass argument by reference to a function in vbscript?
What is the difference between a dictionary and an array?
How will you get the last occurrence of one string within another string using vbscript?
What are the different types of operators and their order of precedence?
What is the difference between for loop and while loop?
Explain the functionality of vbscript?
How can constants be declared in the vbscript language?
what is the differance between BYVAL,BYREF?
1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?
Explain the string concatenation function in vbscript?
Which event is triggered when mouse focus comes out of an element in the vbscript language?