Monday, September 14, 2015

How to swap two numbers without third variable?

int first,second ;
first = 1;
second = 2;
first = first + second;
second = first - second;
first = first - second;

No comments:

Post a Comment