Factorial loop can be start from 2
RubberBigPepper opened this issue · 1 comments
RubberBigPepper commented
fun compute(number: Int) : Int {
var result = 1
for (i in 1..number) { //loop can be i in 2..number as in FactorialBig
result *= i
}
return result
}
DmitryTsyvtsyn commented
Good!)