Figure 2.2:
Syntax and Working of a while Loop
Explanation:
The first line shown in the syntax is known as
The
Stmt part
is
executed when the
boolExpr
returns a true value.
When it returns a false value, the loop is terminated.
It is possible to exit the while loop without executing the statement part in the loop if the
boolExpr
yields a false value the first time.
Do'stlaringiz bilan baham: