I did not understand this problem?

can someone describe this problem?

@akshat2806
hello akshat,
please share the screenshot of the question

@akshat2806
image

should i take all the input all at once or go in loop and correspondingly take input till sum becomes negative and stop output?

image

i am using this code in c
#include<stdio.h>
int main(void) {
int no,n,sum=0;
scanf("%d",&n);
for (int i=1;i<=n;i++){
scanf("%d",&no);
if(no>=-1000 && no<=1000){
sum+=no;
if(sum>=0)
printf("%d\n",no);
else
break;
}
else{

printf("Enter number bewteen -1000 and 1000");

}

}
return 0;

}

@akshat2806
n is not the number of inputs ,u should read till u get positive cumulative sum

#include<stdio.h>
int main(void) {
int no,sum=0;
for (int i=1;i>0;i++){
scanf("%d",&no);
if(no>=-1000 && no<=1000){
sum+=no;
if(sum>=0)
printf("%d\n",no);
else
break;
}
else{

printf("Enter number bewteen -1000 and 1000");

}

}
return 0;

}
// i changed the code and go on for infinite number of inputs
this worked
thank you

pls dont forget to mark it resolve