is there an error in this snippet if there is debug it for errors.
int sum=0;i;2
for(i=10;j>=1;i=2);
{
sum+=j%i
j+=3;
}
print("total accumulated sum=sum);
j is undeclared.
If that was just a mistake I can't tell what you're trying to do. But what jumps out at me is that j is being
incremented and therefore the loop will never terminate since the condition is j >= 1.
*****************************************************
It would be useful to know what kind of error are you looking for: syntax ? logic ?
Please tell us what you are trying to accomplish, and thus more help can be provided.
Last Wiki Answer Submitted: September 16, 2008 4:29 pm by Jarro278330 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
As Jarro said, the loop will never terminate, since j will always be >= 1 (or will never start if j is initialized with a a negative value).
i want to share my computer and it knowledge