The number of digits

Report a typo

Write a program that reads a number and outputs the number of digits in it. Guaranteed that every input number has 1, 2, 3 or 4 digits.

This problem has lots of possible solutions. Use when for now.

Sample Input 1:

655

Sample Output 1:

3

Sample Input 2:

12

Sample Output 2:

2
Write a program in Kotlin
fun main() {
// put your code here
}
___

Create a free account to access the full topic