algorithm to swap two numbers without using third variable
Answers
Answered by
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