/*
 * REPETITION (while loop, pre-test): the decision comes BEFORE the body,
 * so the body can run zero times.
 *
 * Flowchart:
 *   (Start)
 *     -> [i = 1]
 *     -> <i <= 5?> <-------------------+
 *          True  -> /Print i/          |
 *                -> [i = i + 1] -------+   (arrow back up to the decision)
 *          False -> (End)
 */
public class CountWhile {
    public static void main(String[] args) {
        int i = 1;                 // initialize
        while (i <= 5) {           // test
            System.out.println(i); // body
            i = i + 1;             // update
        }
    }
}
