My code is not working but it's compiling and working well in othere ide

#include
using namespace std;
int main() {
int input;
cin>>input;
int sum =input;
while(sum>=0){
cin>>input;
sum = sum+input;

	if(sum<0) break;
	cout<<input;

	}

return 0;

}
this is my code for cumulative sum plese help asap

Please save your code in ide.codingblocks.com and then share its link.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.