Given a list of numbers, stop processing input after the cumulative sum of all the input becomes negative

why code is not printing any number?

hello @moksh
ur while loop condition is not correct.

make it while(sum>=0) and then try