Source: https://www.univ-irem.fr/IMG/pdf/algoetprogaucycle4ciilycee.pdf