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 |
Explain sga memory structures?
What variable can you use to share info across the whole application for one user?
How to pass the parameter from one function to another function in VB Scripting?
write any ttest cases using check points and parameterization
write script to open Gmail.com, and to write script for entering username and password and show whether the result as pass or fail
how to validate the text in a web table
In QTP how to insert a data base check point for web based application and simultaneous link to code in expert veiw. hw to retrieve a data(single coulumn from server) that matches with inserted value manually or exported from excel sheet.
what is the differenece btwn scripting language and programming language
How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'
Explain about tristate constants?
How do i automate a website www.flyashx.com without having any test cases witin a week time.
how to comvert 120 into one hunderd twenty rupees only and vice varsa