Well, input is originally a string anyway, so I'd declare the input variable as a string. Then, if your array has to be an array of integers, you can convert your string digit by digit (just make sure you actually get the number you want rather than the ASCII code for the number character) for input into your array.