0
Whats the difference between these 3 while loops ... Check the code and comments for more
2 odpowiedzi
+ 1
First of all.
In the second while loop, you're wrong in the comment, it's not from 20-26, but it's from 21-26.
Why the first differ from second?
simply because in the first while loop you increment after output the value.
while on the second you increment before output the value.
when the first while loop the variable i reach 25, at the end of the loop the value of i actually 26. but you dont output the value, that's why only 20-25.
and the third while loop needs no explanation, you should understand that, it's basic , it's increment the value to the end of the loop, then output the value.
0
thnx