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 |
write a program to display the system specifications of client system with the help of vb script.
Explain about arrays in vb script?
Can automation testing find ssame no. of bugs what we can find by manual testing?
How regexp.execute method works?
How to write VB script for login module?
I need to get some data from data base and store this (retrieved) data in a excel sheet using VB script in QTP9.0 I have created connection for data base I have created as excels sheet by using Set XL=CreateObject("Excel.Application") XLworksheet.cells(1,1).value= rs.fields.item("<<The data retrieved from data base >>") I have taken a for loop and changed the cells values (1 as i and another 1 as j) But still I am not able to get Plz kindly tell me know this . It is very urgent
What is the difference between do until loop and do while loop?
How will you check that a variable is an array in vbscript?
what is test scenario?
Explain about .wsf files?
How to Import data from a file (file is on the desktop) to the data table
What are events in the vbscript language?