Swapping Variables

Q

Can you write a program to interchange 2 variables without using the third one?

✍: FYIcenter

A
a = 7;
b = 2;
a = a + b;
b = a - b;
a = a - b;

2007-02-26, 6182👍, 0💬