in this question it says stop processing after cumulative sum is negative, we have to use EOF here or not?
here is my code:
#include
using namespace std;
int main() {
int no,sum;
while(scanf("%d",&no)!=EOF && sum>0)
{
cout<<no<<endl;
sum=sum+no;
}
return 0;
}