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



Could Anybody tell me the VBscript for REVERSE an Integer int reverse(int num) Ex:246 to 642..

Answer / naga siva sankar

val=246
valstr=cstr(val)
msgbox strReverse(valstr)

Is This Answer Correct ?    11 Yes 5 No

Could Anybody tell me the VBscript for REVERSE an Integer int reverse(int num) Ex:246 to 642..

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

Could Anybody tell me the VBscript for REVERSE an Integer int reverse(int num) Ex:246 to 642..

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

Could Anybody tell me the VBscript for REVERSE an Integer int reverse(int num) Ex:246 to 642..

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

Could Anybody tell me the VBscript for REVERSE an Integer int reverse(int num) Ex:246 to 642..

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

Could Anybody tell me the VBscript for REVERSE an Integer int reverse(int num) Ex:246 to 642..

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

Could Anybody tell me the VBscript for REVERSE an Integer int reverse(int num) Ex:246 to 642..

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

Post New Answer

More VB Script Interview Questions

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)?

2 Answers   HCL,


How to map test cases with Automation script? Please explain in details.With example Thanks for your co-operation(In Advance)

1 Answers   Google, IBM,


Write a program to resize an array of 5 elements to 4 elements and display all the elements.

1 Answers  


How to assign a numeric value to a variable?

0 Answers  


how to find greatest of n numbers!

3 Answers   Syscon,






. Program for sorting of numbers in vb script?

2 Answers   Talent Sprint,


What are the advantages of vbscript?

0 Answers  


How to write functional test cases for send button in gmail.

2 Answers   Arctern,


How to create MSAcess table foriegn key

1 Answers  


What is a class in CSS?

1 Answers  


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?

6 Answers   Nous,


which is the bset training centre to learn automation tools?

2 Answers  


Categories