Source: https://bundy.laverdad.edu.ph/programmer/en/langage/c-cours-et/exercices/corrig/0i-Rd8SwuFO.pdf