Sum the Input

Medium · Loops · while read · Arithmetic

Problem

Numbers arrive on standard input, one per line.

Print their total.

Examples

Input: 1\n2\n3
Output: 6

Approaches

Related problems

Start free on Cariara · Coding problems · System design studio

Starting Python
No results yet.

          
↑↓ move ↵ open esc close

Labs

Loading labs…

Run with your own input

Starting Python

Loading Python…