Iterated code with do statement