CSC300: Rules for looping [12/13] Previous pageContentsNext page

There is an index (more generally, some metric)

    i

Start somewhere valid

    i = 0

Base case says when to stop

    i >= a.length

Inductive case takes us closer to base case

    i = i + 1

Previous pageContentsNext page