We begin with a comment and the program name, then go on to define
an integer variable count within the body of the program. The variable
is set to zero and we come to the while loop itself. The syntax of a
while loop is just as shown here. The keyword while is followed by an
expression of something in parentheses, followed by a compound
statement bracketed by braces. As long as the expression in parenthesis
is true, all statements within the braces will be executed. In this case,
since the variable count is incremented by one every time the statements
are executed, it will eventually reach 6, the statement will not be
executed, and the loop will be terminated. The program control will
resume at the statement following the statements in braces.