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

hi Set myobj=Description.Create() myobj("type").value="submit" myobj("name").value="google search" myobj("html tag").value="button" browser("title:=google").page("title:=google").webButton (myobj).Click i was running above code in one weak back it was working fine i got result,again i opened after few days ,again i was trying to run the code it shows run time error in last line of my code ,why ?pls answer my question?

0 Answers  


who will create the object?

0 Answers   Estuate,


How are comments handled in the vbscript language?

0 Answers  


find the length of the string without using length function?

4 Answers   CSS Corp,


What is the difference between vb debugger and the script debugger?

0 Answers  


Could Anybody Please tell me What is the script for Find 3rd Largest element in the Array without using a SORT function int Find(int arr[], int size); Thanks in Advance..

0 Answers   Amazon,


how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.

0 Answers  


how to answer "TELL ME ABOUT UR SELF" as exp.person. whr to start and whr to stop. can anyone tel me

0 Answers  


I want to count the total no of links present in yahoo home page. The script like Set fileSysObject=createobject("Scripting.FileSystemObject") Set linksFileName=fileSysObject.opentextfile("D:\samplelinkfile.txt",2,true) Set linkDescObj=description.Create linkDescObj("micclass").value="Link" Set noOfLinks=browser("yahoo").Page("Yahoo!India").ChildObjects(linkDescObj) For i=0 to noOfLinks.count-1 linkName=noOfLinks(i).getROProperty("name") linksFileName.writeline(linkName) Next linksFileName.close Set fileSysObject=nothing But while running the script it is fail (the object not present in the object repository).How to overcome please tell me the detail steps...for QTP9.30

1 Answers  


What are the valid scopes of a variable in vbscript?

0 Answers  


Can anyone send me a vb script function for verifying the functionality of active links on a web page

0 Answers   Zensar,


Capture the Unique label changes on google home page for I am feeling lucky button and save those label changes to Notepad Note: Using QTP

0 Answers   Quest,


Categories