Module: (C++) Tasks for using a while loop


Problem

4 /9


The sum of the elements of the sequence - 2

Problem

Find the sum of a sequence of natural numbers if the sign of the end of the sequence is two consecutive numbers 0. Numbers after two zeros should not be involved in solving the problem.

Input 
A sequence of natural numbers is entered.

Imprint
Print the answer to the problem.
 

 

Examples
# Input Output
1 2
0
7
0
9
0
0
3
18