Simple Input Related Problem

How will we know when to stop?

The idea here is to create an infinite loop, and calculate the sum inside this loop while taking inputs. As soon as the sum becomes less than 0, you can break the loop.

code https://ide.codingblocks.com/s/123704

still gives wrong- answer on all test cases

Your code is giving wrong answer for the sample test case also. You need to print all inputs up to which the sum is greater than 0. For example, for the input:
1
2
88
-100
49

Your output : 1 2 88 -100
Correct output : 1 2 88