Files
kotlin/compiler/testData/codegen/script/topLevelFunction.ktscript
2012-06-05 22:56:26 +04:00

12 lines
160 B
Plaintext

// expected: rv: 3628800
fun factorial(n: Int): Int {
var product = 1
for (i in 1..n) {
product *= i
}
return product
}
factorial(10)