Source: https://mathmallet13.pagesperso-orange.fr/2019_20_1STMG/1STMG_Ch03_boucle_While.pdf