The Euclidean Algorithm, recusively and iteratively [00K2]

The material in this section is also presented via a POGIL activity.

We will consider two different implementations of the Euclidean Algorithm.

By trying examples, it seems like both these algorithms produce correct results. But how can we be sure? This is an important question, because it's easy to write versions of these algorithms which look very similar, and even work some of the time, but which sometimes crash, loop forever, or return an incorrect result!

Context

The Euclidean Algorithm [00JU]