Firstly we define a variable to 0.
We create a loop who start to 4 and stop to 7 because (i<8).
When i equal to 6 we continue to the next iteration i equal to 7.
Result :
sum = 4
sum = 9 (4+5)
continue => (sum = 9)
sum = 16 (9+7)
the page display 16.
note : In the loop, post-increment is unnecessary, use pre-increment
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Firstly we define a variable to 0.
We create a loop who start to 4 and stop to 7 because (i<8).
When i equal to 6 we continue to the next iteration i equal to 7.
Result :
the page display 16.
note : In the loop, post-increment is unnecessary, use pre-increment