write a vbscrpit to swap values

Answers were Sorted based on User's Feedback



write a vbscrpit to swap values..

Answer / 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

write a vbscrpit to swap values..

Answer / 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

More VB Script Interview Questions

What is the output of a + b in vbscript if a = 5 and b = 10?

0 Answers  


How will you get the natural logarithm of the given number in vbscript?

0 Answers  


Which operator can be used to check if two numbers are equal or not in vbscript?

0 Answers  


while using Keyward driven framework in QTPif new requirements are added how to manage it...plz ans

0 Answers   IBM,


Explain the functionality of vbscript?

0 Answers  






how to automatically update the sql server2005 database records when insert in vb6?

0 Answers  


I want good books or good sites for scripting.Can any one help me.

0 Answers   Wipro,


input values to accept 2 numbers & print the product, difference and sum using switch case

1 Answers   CSC,


WHAT IS ENVIRONMENT VARIABLES?and where it is used in real time scenario?

2 Answers  


write a vb script to display apple that is 1st a should be displayed then ap then app then appl then apple

7 Answers  


How do you get the value of a combo box in Javascript?

2 Answers   Aspire,


how to check whether link is disabled in QTP??

0 Answers  


Categories