array, user input , while, gets.chomp, push, join methods