Input = 124
output should be 124421
Please do not use any string functions/variables
Answers were Sorted based on User's Feedback
Answer / manjunathareddy
Dim n
Dim s
Dim x
input=124
n=124
While int(n)>0
s=n mod 10
x=x&s
n=Int(n)/10
Wend
Msgbox input&x
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / eswar
'Numbers can be given at run time
For i=1 to 3
s =InputBox("Enter a number : ")
x = x&s
y = StrReverse(x)
Next
MsgBox x&y
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / bherolal bhargav
i=cint(inputbox("Enter 3 digit No."))
i = i*1000+((i mod 100) mod 10)*100+((i mod 100) -(i mod
100) mod 10)+i\100
msgbox i
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / gyanesh ranjan rout
Function printnumber(numb)
x=numb
y=strreverse(x)
msgbox x&y
End Function
printnumber(124)
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / 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 |
Answer / pankaja yathindrakumar
'Input = 124 output should be 124421 Please do not use any string functions/variables
str="124"
Set r=New RegExp
r.pattern="."
r.Global=True
Set c= r.Execute(str)
For each key in c
t=key&t
Next
Msgbox str&t
| Is This Answer Correct ? | 0 Yes | 0 No |
how to add action through AOM in QTP
how to validate the text in a web table
how to write function to validate the number of characters entering into the text box?
Explain different types of segment?
If we take 2 strings as “good” and “bad” then what will ‘+’ and ‘&’ operators return?
join all the array values without using join function?
what is descriptive programming in QTP and what is environment variable in QTP? where we store and what is its use?
Which event is triggered when mouse focus comes out of an element in the vbscript language?
write a vbscrpit to swap values
Both Static and dynamic arrays are handled by VB script. Is it true?
Mention characteristics of sub procedures?
Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com