Computer Science, asked by anil161016, 10 months ago

algorithm to swap two numbers without using third variable​

Answers

Answered by shreyanshjain1111
0

Step 1: X1= X1+X2

Step2: X2= X1-X2

Step3: X1= X1-X2

Explanation:

let the 2 initial variables be X1 and X2

Step 1: X1= X1+X2

Step2: X2= X1-X2

Step3: X1= X1-X2

Similar questions