print the array values in ascending order?
Answers were Sorted based on User's Feedback
Answer / 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 |
arr = Array(4, 6, 2, 7, 3, 5, 1, 8, 10, 22, 33, 15, 11, 8)
For i = LBound(arr) to UBound(arr)
For j = LBound(arr) to UBound(arr) - 1
If arr(j) > arr(j + 1) Then
TempValue = arr(j + 1)
arr(j + 1) = arr(j)
arr(j) = TempValue
End If
Next
Next
s = ""
For i = LBound(arr) To UBound(arr)
s = s & arr(i) & ","
Next
Msgbox s
'Expected output
---------------------------
---------------------------
1,2,3,4,5,6,7,8,8,10,11,15,22,33,
---------------------------
OK
---------------------------
Is This Answer Correct ? | 0 Yes | 0 No |
Explain about the extension .hta?
in qtp we ve datatable look like excel ,if we want to extract data from excel which saved in my documet how can i get that in datatable using vb script
where can i learn VB scripint ?
a;;b;c;;;d in this string output is abcd will come how can we do that in vbscript in QTP testing?
Create a file system object to do the following i. Create a folder ii. Create a text file in the folder iii. Update text file with some tex
What is a class in CSS?
Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?
What is Procedure or Subroutine in VB Script?
Hellow friends, I am learning QTP,but here problem is VB script. please guide me how to learn VB script w.r.t QTP and if you know any books tell me or if you have any materials or any use full material or any else w.r.t QTP please post me p.p.sekhar
Explain about the functionality of vb script?
Explain about scrrun.dll?
write a vb script to find simple interest using functions