Hide

Problem B
Summing Integers

Accepted submissions to this problem will be granted a score of 100

Write a program using a while statement, that given a series of numbers as input, adds them up until the input is 10 and then prints the total. Without adding the final 10.

Input

Input consists of n lines, where 1n1000. The ith line contains one integer ai, where 0ai100. It is guaranteed that an=10.

Output

Output consists of one line with one integer, the sum of the numbers given excluding the final 10.

Sample Input 1 Sample Output 1
8
3
11
10
22
Sample Input 2 Sample Output 2
1
2
5
7
9
8
3
12
20
3
4
7
10
81
Sample Input 3 Sample Output 3
10
0
Hide

Please log in to submit a solution to this problem

Log in