mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 00:21:32 +00:00
11 lines
214 B
Kotlin
Vendored
11 lines
214 B
Kotlin
Vendored
fun box(): String {
|
|
var result = 0
|
|
for (i: Int? in 1..3) {
|
|
result = sum(result, i)
|
|
}
|
|
return if (result == 6) "OK" else "fail: $result"
|
|
}
|
|
|
|
fun sum(i: Int, z: Int?): Int {
|
|
return i + z!!
|
|
} |