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 |
Can anybody code this problem for me in VB script - Create an array of 4 elements, increase its size to 7 elements and then find out which of the elements are prime (use functions)
Could Anybody tell me the VBscript for REVERSE an Integer int reverse(int num) Ex:246 to 642
Which command is used for writing text on a page?
create a form to accept username and password validate the username and password with using message box, display the corresponding user message
What is the difference between Javascript & Vbscript?
Hi, I need to accept user inputs for login at runtime.I know i can use Inputbox but how to proceed further that i dont know. Thanks in advance
Does VB/Win make standalone .EXE files?
Mention what is variant in vbscript?
what is the function to display current date?
write a program to display configuration of a local system with the help of vb script.
Difference between Function and Sub routine?
compare the string without using stringcomp function?