New programming language exercise - array