Skip to content · ⁨본문 바로가기⁩

Nested loops and patterns · ⁨중첩 루프 및 패턴⁩

A loop inside a loop

  • You can put one loop inside another. The inner loop runs fully for each step of the outer loop.
  • This is how you work with rows and columns, or compare every pair of items.
  • If the outer loop runs R times and the inner runs C times, the inner body runs R × C times.

A 3-by-4 grid of stars: the outer loop walks the rows, the inner loop walks the columns

Handout · ⁨교재 자료⁩

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP