Last active
June 14, 2019 11:44
-
-
Save ahmedbr/03c00fac0641aea2facc76c7ee4f7a51 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int x = 10; | |
int y = 5; | |
Console.WriteLine("Before swapping: x = " + x + ", y = " + y); | |
x = x + y; | |
y = x - y; | |
x = x - y; | |
Console.WriteLine("After swapping: x = " + x + ", y = " + y); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment