Input = 124
output should be 124421
Please do not use any string functions/variables
Answer Posted / anil
input="421"
Dim arr(3)
arr(0)="4"
arr(1)="1"
arr(2)="2"
Set arrlist=CreateObject("system.collections.Arraylist")
For i=0 To UBound(arr)-1
arrlist.add arr(i)
Next
arrlist.sort
For i=0 To UBound(arr)-1
c= arrlist.item(i)
temp=temp&c
next
MsgBox temp&input
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to create a cookie using vbscript?
Which operator can be used to change the value of the operand or change the state of the condition?
Mention what is the technology used by vb script?
What is the use of the date function in the vbscript language?
how to set one column as primary key in QTP and fetch values accordingly
How to write VB script for login module?
what is the differance between BYVAL,BYREF?
Mention what is select case statement?
Program to use input box and send even numbers into sheet1 and odd numbers into sheet2 and prime numbers into sheet3 using vbscript(QTP)?
Mention if qtp generates vbscript code as we record actions, can't it possible to directly write using vbscript code when qtp does the same thing too?
Hi, Can anyone please send me vb script examples to practice vb and also material to learn vb scripting in QTP? my email id : hareen_11@yahoo.com
how to write validation function for date in vb script
What if you do not specify anything when you call a procedure?
What is the output of a + b in vbscript if a = 5 and b = 10?
Explain about the support of asp for vb script functionality?