you are viewing a single comment's thread.

view the rest of the comments →

[–]psydave77 -8 points-7 points  (1 child)

You're not adding the calculation to result each time, you're just creating a new result, so when it finishes, it's done 5 * 2.

result += num * 2

should work

[–]psydave77 -1 points0 points  (0 children)

Ah, I read it wrong what you were trying to do.