Source: https://www.procomptable.com/etudiants/cours_exercice_initiation/corriges/INIT2_chapitre_5_app_corrige.pdf