Created
June 8, 2023 11:18
-
-
Save kalaiselvan369/7e8536f87b32acb6cd0e73ea8c6153ca to your computer and use it in GitHub Desktop.
Assignment operators
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() { | |
// assignment operators | |
var sum = 3 | |
sum += 3 | |
println(sum) | |
var sub = 13 | |
sub -= 3 | |
println(sub) | |
var mul = 3 | |
mul *= 3 | |
println(mul) | |
var div = 3 | |
div /= 3 | |
println(div) | |
var mod = 12 | |
mod %= 3 | |
println(mod) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment