Write an algorithm to exchange
the value of 2 variable.
Answers
Answered by
3
Answer:
Given two variables, x, and y, swap two variables without using a third variable. The idea is to get a sum in one of the two given numbers. The numbers can then be swapped using the sum and subtraction from the sum.
Explanation:
Hope it help you.
Similar questions