Nesting while loops in for loops - Iteration - Computer Science