Often, to solve a problem, it is necessary to repeat several times certain statement, possibly changing the value of some variable at each repetition.
Programming languages provide two ways to obtain the repetition of statements:
We will see now the use of loops, and we will see later the use of recursion.