Simpleinput doubt

https://online.codingblocks.com/player/29363/content/6861/4693

are you looking for a hint for this problem?

HINT:actually the user can enter as many numbers as he wants…so the idea is to take inputs in an infinite while loop…maintain a sum and as soon as sum becomes negative break from the while loop…

as discussed on chat…refer to this pseudo code