Share your repls and programming experiences

← Back to all posts
6.5. While: Length of sequence
pole55

Given a sequence of non-negative integers, where each number is written in a separate line. Determine the length of the sequence. The sequence ends with 0. Print the length of the sequence (not counting the 0). The numbers following the number 0 should be omitted.

Example input
1
7
9
0
5

Example output
3

Voters
bruh02
SD10ZZ739386
simisola
Serena06
f877877
PaulaKristianaK
CobyP
a41087
nikitha05
RyanWhitford15