I know what do does, and how it cooperates with the while loop, but won\'t a while loop code be the same, whether or not the do is there?
Use do-while() construct when you have to get your task executed at least once even if condition fails. Use while() when you your task to be executed only on certain condition success.