To swap two integer variables, we can use the addition (+) and subtraction (-) operators between the variables. Consider the two integer variables are x and y then we can swap them using –  x = x + y
y = x – y
x = x - y In this case, we first added the two integers x and y, and then stored them in x. We then assign x – y to y but x here is equal to x + y which means that we are assigning y = x – y = (x + y) – y = x. Next, we assign x as x – y where we are performing x = x – y = (x + y) – (x) = y. Therefore, by using some mathematical calculations we can swap two integer variables without using a temporary variable.