whats the problem with this one…none of the test case are passed
#include
using namespace std;
int main() {
int n,sum=0;
while(sum>0)
{
cin>>n;
sum=sum+n;
cout<<n;
}
return 0;
}
Simple input problem
@Learning_bunny
You have initialised sum as 0. Your loop runs only if sum > 0. Basically your loop never even starts due to the initialisation.