think about what your code should do: "Look up every new string whether it is already in my array?"
=> so you need to loop
every time through the complete array.
a) use a for loop
b) when found you are done
c) after looping all entry you know that you havent found it.
bonus: (only than add it)
You can use some
C++ tutorial to learn the basics.
Develop your code and pseudo code yourself to learn programming. Use always a verb and objects.
The first can be: "Ask numbers for input"