This discussion is archived
10 Replies Latest reply: Jan 6, 2005 7:15 PM by 800382 RSS

How do you swap two variables A and B without using a 3rd variable?

807596 Newbie
Currently Being Moderated
How do you swap two variables A and B without using a 3rd variable? No function or method allowed.



For example:



Given:

A = 35

B = 10



Result

A = 10

B = 35