i have tried best code for the program but error says wrong answer although it gives exact output as wanted
Error in thi program
hi @anujsharmabadboy actually the number of “inputs” is not given, all the numbers in the input contribute to the sum. the input
1
2
88
-100
49 should be processed like this
sum = 0
take input, 1, sum becomes 1, sum > 0, print 1
take input 2, sum becomes 3, sum > 0, print 2
take input 88, sum becomes 91, sum > 0, print 88
take input -100, sum becomes -9, sum < 0, break