2008-10-24, 02:58 AM
say you have
a = 1
b = 2
how do you swap the values in a and b without using a temporary variable, ie you cant do something like this
c = a
a = b
b = c
your end result is
a = 2
b = 1
a = 1
b = 2
how do you swap the values in a and b without using a temporary variable, ie you cant do something like this
c = a
a = b
b = c
your end result is
a = 2
b = 1

