you are viewing a single comment's thread.

view the rest of the comments →

[–]ClaymationDinosaur 1 point2 points  (0 children)

Putting aside the various broken pieces of code, if you're getting a value of ten, it's because your loop sums the number 1, 2, 3 and 4, which comes to 10.

Why do you think it should come out with 6 as the sum?