Why subroutines matter
Why subroutines matter

Structured programming starts with sequence, selection and iteration, but large programs quickly become hard to read if every step is written in one long block. A subroutine solves this by putting a named task in its own block of code and running it only when it is called.