program returns an array from 1 to number inputted by user