Source: https://www.emi.ac.ma/eleuldj/Cours/Prog/Prog1et2.pdf