All the following words are from the book "C++ How to Program, Fifth Edition", H.M. Deitel. Any commercial using is firmly denied.
Good Programming Practice 5.1
Put a blank line before and after each control statement to make it stand out in the program.
Too many levels of nesting can make a program difficult to understand. As a rule, try to avoid using more than three levels of indentation.
Good Programming Practice 5.2
Vertical spacing above and below control statements and indentation of the bodies of control statements within the control statement headers give programs a two-dimentional appearance that greatly improves readability.
Good Programming Practice 5.3
Always including braces in a do...while statement helps eliminate ambiguity between the while statement and the do...while statement containing one statement.
do
statement
while ( condition );
The last line --while (condition);-- might be misinterpreted by the reader as a while statement containing as its body an empty statement.
Thus, use the following.
do
{
statement
}while ( condition );