Source: http://www.acharkaoui.com/wp-content/uploads/2008/07/fonction-min-max-moyenne-tp2.pdf