chap02: ex04: Add exercise with nested loops.