SyntaxFix
Write A Post
Hire A Developer
Questions
Since the original solution is:
temp = x; y = x; x = temp;
You can make it a two liner by using:
temp = x; y = y + temp -(x=y);
Then make it a one liner by using:
x = x + y -(y=x);