Source: https://www.kiteb.net/education/informatique/bac/bacinfo2009/bac-pratique-19052009-sc-corrige3.pdf