Thursday, July 21, 2011

How to swap two numbers without using third variable?

a = inputbox ("Enter the first value")
b = inputbox ("entre the second value")

msgbox "before swapping a="&a
msgbox "before swapping b="&b

a = int(a)+int(b)
b = int(a)-int(b)
a = int(a)-int(b)

msgbox "After swapping a="&a
msgbox "After swapping b="&b

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

No comments:

Post a Comment