. Program for sorting of numbers in vb script?
Answer Posted / amrita
We will assign the series of numbers in array then will the sort that. Below is the code:
a = array(3,4,9,2,7,1)
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)
print a(i)
'It will print 1,2,3,4,7,9
Next
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Mention what is vbscript?
What methods are used to create text files and open text files in the vbscript language?
Why to use option explicit in vb script?
How you can call vbscript functions?
How are values assigned to the variables in the vbscript language?
Please let me Know regarding any material regarding VB Scripting which should be easily understandable for Beginners.
How to pass argument by reference to a function in vbscript?
Mention when to use function procedures and what are its characteristics?
Which object is used to work with the excel sheets in the vbscript language and what statement is used to create this object?
Differentiate javascript and vbscript?
I am working on QTP, got struck in one place.. In my application depending upon configuration WebEdit count is increasing/ decreasing.. how to get these webedits..
Capture the Unique label changes on google home page for I am feeling lucky button and save those label changes to Notepad Note: Using QTP
Explain the constants in vbscript?
How will you compare two strings in vbscript?
How to add actions in driver script to run those actions in QTP?