Count total number of digits in number using function and while loop in Kotlin
I have just started learning Kotlin for android studio, and it is my first programming language. over time, I am facing lot of dilemmas/bugs/questions/misunderstandings etc.
if we go back to the question: I solved it! yeah but I am not sure whether it is optimal version/solution.
This version is working!!
fun main() {
// count digits of given number while
println("please enter number program counts its digits")
val n = readLine()?.toInt()!!
println(countDigit(n))...