Even with all these explanations I don't understand how all this is supposed to work. And I don't see where you are searching for the letter "a" in your code.
Anyway, just follow my suggestions: For the first task, check if the word exist in the array, if not - add it to the array. For the second task, to check if the word contains letter "a", use find(word,"a")>=0 expression.