Source: https://matmirf.files.wordpress.com/2019/09/2nde-chap-01-algorithmique-et-programmation-partie-3-1.pdf