Redo of Assignment 4.1, fixed the logic so that the first character of the input string is pushed to the array