View Single Post
Go4Expert Founder
13Dec2007,08:18  
shabbir's Avatar
For while loop you should increment the counter as the last statement and then it will be equivalent.

Do while loops are a bit different and cannot be equal to for loop but in your case applying the increment as the last statement of the loop would do.