Skip to content

Instantly share code, notes, and snippets.

@ninjapanzer
Last active March 6, 2016 14:34
Show Gist options
  • Select an option

  • Save ninjapanzer/7fb06362d2232301fd35 to your computer and use it in GitHub Desktop.

Select an option

Save ninjapanzer/7fb06362d2232301fd35 to your computer and use it in GitHub Desktop.
#include <iostream>
int main() {
int x = 5;
int y = 10;
std::cout << "Orig: x = " << x << std::endl
<< " y = " << y << std::endl;
x = x + y;
y = x - y;
x = x - y;
std::cout << "Flip: x = " << x << std::endl
<< " y = " << y << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment