Loop invariant code in an imperative programming language are statements, which could as well be placed outside of the loop: before the loop, if the loop always terminates or behind the loop, which is semantically more correct.
Loop invariant code in an imperative programming language are statements, which could as well be placed outside of the loop: before the loop, if the loop always terminates or behind the loop, which is semantically more correct.