Computer Science, asked by vijaykumar5836, 1 year ago

How do you swap two integers without using a temporary variable?

Answers

Answered by Anonymous
2

Answer:

Explanation:

variables, x and y, swap two variables without using a third variable. The idea is to get sum in one of the two given numbers. The numbers can then be swapped using the sum and subtraction from sum.

Answered by Anonymous
0

Explanation:

How to swap two numbers without using a temporary variable? Given two variables, x and y, swap two variables without using a third variable. The idea is to get sum in one of the two given numbers. The numbers can then be swapped using the sum and subtraction from sum.

Similar questions