write a vbscrpit to swap values

Answer Posted / manjunathareddy

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=oNum2-oNum1
Msgbox "After Swaping numbers are"&" "&oNum1&" "&oNum2

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is error handling required?

572


What are the disadvantages of vbscript?

652


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

556


What purpose does ‘on error resume next’ serves?

549


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

505






What are events in the vbscript language?

550


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

1588


Develop a parameterized action that accomplishes the following a. Launch a browser of users choice ( example : IE, chrome etc) b. Open up a search engine (Google, Bing etc) c. Perform a search d. Click a particular link depending on the user’s choice ( 1st , 2nd or third link)

1409


What is event handling in vbscript?

599


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.

4744


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.

1442


Explain about adodb.stream class?

590


How will you get the exponent of the given number in vbscript?

556


Explain about scrrun.dll in vbscript?

648


What are string functions in vbscript?

656