Kotlin Mod (VERIFIED 2027)
val crash = 10 % 0 // Throws ArithmeticException: / by zero
Kotlin defines the Euclidean modulo $r$ such that: $$ a \equiv r \pmodb $$ and: $$ 0 \leq r < |b| $$ $r$ is always non-negative. kotlin mod
println("The remainder of $a / $b is $remainder") // Output: The remainder of 10 / 3 is 1 val crash = 10 % 0 // Throws