For Loop different type on how to code [closed]
The last two lines should clue you in: one has y++ before the closing brace, and the other has it after. In the first, y will be incremented each time the loop runs, right before a=a+y is executed. In the second, y will be incremented after the loop ends.