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

In html file what is an ideal position to include vbscript?

793


Explain about tristate constants?

573


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

567


How to open a file. What is the perpose of true and false mode there?

589


How can constants be declared in the vbscript language?

538






how to operate webobjects in a webpage using getobject function and then using generic methods?

2529


Explain about vb script?

732


What methods are used to create text files and open text files in the vbscript language?

521


What are class properties?

643


What is loose binding? Why is it not a good practice to use it?

615


Explain the support of asp for vb script functionality?

623


Explain about .wsf files?

607


How regexp.execute method works?

576


What is the purpose of folders object of scripting.filesystemobject class in vbscript?

846


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

705