Following is the code which swaps 2 numbers without using temp variable
Output:
I was struggling by trying with different formulae, but nothing worked. I didn't think that we can recalculate first variable for resulting the output.
I got the idea from this post answered by this member.
No comments:
Post a Comment