write a vbscrpit to swap values

Answer Posted / monika

Dim oNum1
Dim oNum2
oNum1=Cint(InputBox("Enter the First number here"))
oNum2=Cint(InputBox("Enter the Second number here"))
Msgbox "Before swapping numbers are"&" "&oNum1&" "&oNum2
oNum1=oNum1+oNum2
oNum2=oNum1-oNum2
oNum1=oNum1-oNum2
Msgbox "After Swaping numbers are"&" "&oNum1&" "&oNum2

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which operator can be used to change the value of the operand or change the state of the condition?

573


How to access array data?

542


Explain about scrrun.dll?

528


Which operator is used to perform the comparison among 2 operands in the vbscript language?

524


Hello friends..... Can any give the methods for Ms-Access, and Mozilla firefox in Automation Object Model in QTP. Please give me currect answers... if you do not understand my question please don't give answers. Thanking you.

1846






Which operator can be used to do an xor operation in vbscript?

676


1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?

3551


What are class properties?

650


How strcomp function works?

624


can anyone send me a vb scripts code for clicking on a link and coming back on home page again does the same for many links on a web page.

1835


How will you get a subset of a array in vbscript?

585


Please let me Know regarding any material regarding VB Scripting which should be easily understandable for Beginners.

1537


why do u choose to go for testing why cant for devoloping

1586


By default in vbscript the arguments passed to functions and subroutines are by reference or by value?

620


What is dictionary object in vbscript? Explain?

623