Quote:
Originally posted by charliex
Not true, its <= so it will do 500 times, starting loops at 1 is often the sign of a pascal programmer or such switching to C, the ending value will be 501, not 500. so from 2 to 501
|
I was referring to krazykemist's post where the counter started at 1 then went into the loop. First thing he did in the loop was increment the counter to 2, then print. So you would end up with this at the bottom of the loop:
count number of times printed
2 1
3 2
4 3
.
.
.
498 497
499 498
500 499
501 End of loop
</pre>
So you would only end up with the sentence being printed 499 times.