Sunday, June 26, 2011

Swap two numbers

Swap two numbers without using any other parameter
a=10
b=20
a=a+b
b=a-b
a=a-b
msgbox a&" "&b

Swap two numbers using some extra parameter
a=10
b=20
temp=a
a=b
b=temp
msgbox a&" "&b

No comments: