how to swap 2 variables without using a 3rd in c++ code example Example: how to swap 2 numbers without 3rd variable int a = 3; int b = 5; a = b*a; b = a/b a = a/b