Operators
Learn arithmetic, comparison, assignment and logical operators in Kotlin.
Kotlin Code
Study the example and understand each part.
fun main() {
val a = 20
val b = 5
println(a + b)
println(a - b)
println(a * b)
println(a / b)
println(a % b)
}
Kotlin is commonly developed using Android Studio or IntelliJ IDEA. These examples can be used as a foundation for Android application development.
Key Concept
Operators allow your application to perform calculations and compare values.
Expected Output / Result
25 15 100 4 0
Finished this lesson?
Mark it complete to update your course progress.