Think of it like this: the outer loop is like the hours on a clock, and the inner loop is like the minutes. For every 1 hour that passes, all 60 minutes have to pass first. Nested loops work the same ...