Source: https://www.orleans-informatique.com/info/sio/exercices/TD%20N%C2%B01%20-%20MERISE%202%20-%20corrig%C3%A9.pdf