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

Mention characteristics of sub procedures?

569


What are the data types supported by vbscript?

567


if u ve resrevation for train and u get a number supose 1234xxxokie.after sucessul entering all required fields. now u put that number in search and want to chk wether these ar same or not if both ar same then its okie otherwise test fail.what would be the vb script code for it to compare these two values of different page.

1427


What is byref and byval parameters in vbscript?

594


Which function allows you to instantiate an object given its programmatic identifier or progid?

546






What is the use of the recordset object and which statement is used to create such an object?

520


How to replace junk code recorded by QTP with a mall function.

1632


How can you create a file object to work with the files in the vbscript language?

492


Anyone have qtp11.0 crack?

2368


Explain about vb script?

734


Which operator is used to concatenate the 2 values in the vbscript language?

543


How to Enter Values on the Command promt using VB script

1516


What is the difference between vbscript and vba?

592


Explain about the asc function?

593


Explain about scrrun.dll?

517