Created
February 2, 2018 14:17
-
-
Save theerasan/70f4095c406e55b9cff7c28c0a9e4861 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
fun main(args: Array<String>) { | |
var x = 10 | |
var y = 3 | |
println("Before Swapping x = ${x}, y = ${y}") | |
x += y | |
y = x - y | |
x -= y | |
println("After Swapping x = ${x}, y = ${y}") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment