Section III: 9. Example pseudocode: