6.6. While: Sum of sequence
Given a sequence of non-negative integers, where each number is written in a separate line. The sequence ends with 0. Print the sum of the sequence.
Example input
1
7
9
0
Example output
17
Given a sequence of non-negative integers, where each number is written in a separate line. The sequence ends with 0. Print the sum of the sequence.
Example input
1
7
9
0
Example output
17