Skip to content

Patterns and tables

Read · 1 of 4

Ask a question at every position

For a shape, ask at each (row, column): what goes here? An if inside the inner loop decides.

For a square border: print # if it's the first or last row, or the first or last column; otherwise ..