Skip to content

Instantly share code, notes, and snippets.

@kdabir
Created February 9, 2014 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kdabir/8898796 to your computer and use it in GitHub Desktop.
Save kdabir/8898796 to your computer and use it in GitHub Desktop.
swapping two ints mathematically
int a =-5, b=10;

a=a+b;
b=a-b;
a=a-b;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment