Exerpad
Exercise 4 · Chapter: While LoopsRequired+50 XP

Sum Numbers

Read numbers from the user one at a time. When the user types 0, stop and print the sum.

Example:

Input:

3
5
7
0

Output:

15
Need a hint?
3 available · costs 5 XP each
javascript

Output
Run your code to see the output here.