The “do …while” loop
•The do … while loop is very similar to the while loop.
•Where the while loops
condition was a pre-condition
the “do … while” has a post-condition.
•
i.e with a while loop the condition is checked at the start of the loop, a “do… while” checks at the end.
•The effect is that
the loop always executes at
least once.
•
•