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 |
Here in my automation tool, i am retreiving some values and i need to store this values in the excel. How can i achieve this?. We are using VBA as scripting language. please let me know if you require any further inputs.
How strcomp function works?
wht must be the interview question on corinthian information technology solutions incorporated.
A folder is there inside no of textfiles are avilable. How do count the textfiles. Normally folder means we are using subfolder methods but textfiles is not working for subfolder methods and how do get file name also.
What is wrong with the following code: <%afname="header.asp"%><!?#include file ="<%=afname%>"?>
What is vbscript procedures?
how to check whether link is disabled in QTP??
how to get date format from system locale..format means neither long nor shor... format from system locale. i need like your date is mm/dd/yyyy formate or mm-dd-yy or with time like that. how to get.
Hi anyone Can Send Solution to the Question wt m posting now Prepare Script for the Bellow Scenario? Login to Gmail Page Open Inbox check Mails save them in a Folder
write a script to count no drives in file systems in qtp?
I have an excel sheet with multiple ID's in a column. Now i need fetch those ID's in an application and check whether if it already exist in the DB. If not then i have to go with the process of inserting them in the DB. If it exists then i need to skip that ID and move to the next ID and check the same and proceed. How can i do that with for loop and if condition?
Explain vbscript in detail?