int a=4857 i need output as 7584.without using any inbuild
function?

Answers were Sorted based on User's Feedback



int a=4857 i need output as 7584.without using any inbuild function?..

Answer / r.singh

varnum=4857
vartemp=0
while(varnum/10)>0 then
vartemp=(vartemp*10)+(varnum mod 10)
varnum=varnum/10
wend
rev=vartemp
msgbox rev

Is This Answer Correct ?    9 Yes 1 No

int a=4857 i need output as 7584.without using any inbuild function?..

Answer / bantanahal haribabu

s="12345"
While int(s)>0
n=s mod 10
x=x&n
s=int(s)/10
Wend
msgbox x

Is This Answer Correct ?    3 Yes 0 No

int a=4857 i need output as 7584.without using any inbuild function?..

Answer / testengineer

Thanku Mr.R.Singh,Miss Sumathi and Mr. Bantanahal Haribabu

But Could u please confirm me whether "MOD,INT,LEN" are Inbuilt Functions are not?

Is This Answer Correct ?    2 Yes 0 No

int a=4857 i need output as 7584.without using any inbuild function?..

Answer / anil

s=4857
For i=Len(s) To 1 step-1
c=Mid(s,i,1)
temp=temp&c
Next
MsgBox temp

Is This Answer Correct ?    2 Yes 0 No

int a=4857 i need output as 7584.without using any inbuild function?..

Answer / sumathi

var=4857
For i=1 to len(var)
x=var mod 10
num=num&x
var=var/10
var=fix(var)
Next
print num

Is This Answer Correct ?    1 Yes 0 No

int a=4857 i need output as 7584.without using any inbuild function?..

Answer / mogal

a = 4857

Do while ( a>0 )
num = a mod 10
a = a / 10
output = output & num
loop
print output

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More VB Script Interview Questions

Explain the scope of the variables using dim, public, and private keywords respectively.

0 Answers  


Hi, Anybody could tell me What is the script for Reverse of Given number. Ex:236--632. Thanks in Advance..

10 Answers   Amazon, CSC,


Could Anybody tell me the Script for REVERSE an Interger int reverse(int num) Ex:246 to 642.. Thanks in Advance.

3 Answers   Amazon,


how do you make the variable declaration mandatory?what is the use of "option explicit"?

2 Answers  


Which object provide information about a single runtime error in a vbscript?

0 Answers  






Hi I don't have any idea on VBscript. can any one point me to a good web site to learn VBscript. Regards lina

2 Answers  


What is the purpose of the err object in the vbscript language?

0 Answers  


How to open browser in vb script?

0 Answers  


please can you help me to get a code of flames using a visual basic 6

0 Answers  


Explain about adodb.stream class?

0 Answers  


How can I get the value of an object property or variable in another frame?

1 Answers   Citi Bank,


Hi everybady, i have faced few Qns in one of i attended interview, please help me out with these below Qns. 1. how to join values without using join function? 2. how to compare values without using String compare function? 3. input is Bangalore, but i need output like this below format, what is function to use and get this outcome B A N G A L o R E 4. Input is "CapGemini" but uotput should be like this "inimeGpaC" 5. Input is 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 Can someone let me know results of this Qns, please. Thanks.

2 Answers   CSS Corp,


Categories