Source: https://www.procomptable.com/etudiants/cours_exercice_initiation/INIT1_chapitre_3.pdf