mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
12 lines
227 B
Kotlin
12 lines
227 B
Kotlin
fun withoutAnnotation(x : Int) : Int {
|
|
if (x > 0) {
|
|
return 1 + withoutAnnotation(x - 1)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
fun box(): String {
|
|
val r = withoutAnnotation(10)
|
|
if (r == 10) return "OK"
|
|
return "Fail $r"
|
|
} |