Blog by Firnasz
just...
Showing posts with label
integer
.
Show all posts
Showing posts with label
integer
.
Show all posts
Sunday, May 17, 2015
Swap 2 numeric variables without introducing another variable
int a = 4;
int b = 5;
a = a + b; // a = 9
b = a - b; // b = 4
a = a - b; // a = 5
Older Posts
Home
Subscribe to:
Posts (Atom)