How do you swap two integers without using a temporary variable?
Answers
Answered by
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
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