The length of the sequence

Report a typo

The program gets a sequence of non-negative integers as input. Each integer is written on a separate line. The sequence contains an integer 0. After reading 0, the program should terminate and output the length of the sequence (do not count the final 0).

Sample Input 1:

3
2
1
0

Sample Output 1:

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

Create a free account to access the full topic