Could Anybody tell me the VBscript for
REVERSE an Integer int reverse(int num) Ex:246 to 642
Answers were Sorted based on User's Feedback
Answer / naga siva sankar
val=246
valstr=cstr(val)
msgbox strReverse(valstr)
Is This Answer Correct ? | 11 Yes | 5 No |
Answer / anil
Dim x,y,n
x=246
n=len(x)
for i=1 to n
y=mid(x,i,1)+y
next
msgbox y
Is This Answer Correct ? | 8 Yes | 3 No |
Answer / arpita
n=123
Do While n>0
i=n mod 10
vstr=vstr&i
n=n\10
Loop
msgbox vstr
Is This Answer Correct ? | 5 Yes | 1 No |
Answer / pankaj jaju
Function IntReverse(varNum)
Dim varTemp
If IsNumeric(varNum) = True Then
varTemp=0
While (varNum/10) > 0
varTemp = (varTemp*10) + (varNum Mod 10)
varNum = Int(varNum/10)
Wend
IntReverse = varTemp
Else
IntReverse = False
End If
End Function
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / kiran
dim number
number = inputbox("enter any number")
strlen = len(number)
for i = 1 to strlen
revnumber = mid(number,i,1) + revnumber
next
msgbox revnumber
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / manish
a = inputbox("enter a string or no.")
b = len(a)
For i = 1 to b
c = mid(a,b,1)
d = d & "" & c
b = b -1
Next
msgbox d
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / lak
n=Inputbox("Enter Number Series to reverse")
for i=1 to len(n)
x=n mod 10
temp=temp&x
n=n/10
n=fix(n)
next
msgbox temp
Is This Answer Correct ? | 0 Yes | 0 No |
Consider there are objects in a webapp which are identified by QTP. Suppose you know only the logical name of a object(absolutely nothing else about it). Which approach will you take to find the "micClass" of the object(You can't use Object Spy, or can't add the object in repository)?
How to map test cases with Automation script? Please explain in details.With example Thanks for your co-operation(In Advance)
Write a program to resize an array of 5 elements to 4 elements and display all the elements.
How to assign a numeric value to a variable?
how to find greatest of n numbers!
. Program for sorting of numbers in vb script?
What are the advantages of vbscript?
How to write functional test cases for send button in gmail.
How to create MSAcess table foriegn key
What is a class in CSS?
How can we return a value from User Defined Function ? For Eg. we have 2 functions. In Fun1 i am getting 2 values (a,b) and i am addding those 2 and storing in to another var (c). Now i want to pass that var(c) to another function (fun2). What will be the script?
which is the bset training centre to learn automation tools?