CJCoding With Joseph
15free / daySign inCreate account

Sum Until A Blank Line

Read whole numbers one per line with the prompt Number: and add them up until a blank line is entered, then print Total: <sum>. Input: zero or more integers, one per line, then an empty line. Because input() never ends the line, every prompt and the final total run together on one output line, as Expected Output shows.

Expected Output:

Number: Number: Number: Total: 9

= newline. The output ends with a newline — print one after the last line.

Hints3 available
Topics:
Menus & Validation
📥 Auto-Input:
4\n5\n\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.