So, I've successfully made a program that prompts the user to enter 10 nouns and 10 verbs and randomly selects two nouns and one verb to display a sentence. But, I'm struggling to check the user input for duplicate entries, such as if they enter the noun "bird" twice. Is there a way to check the user input for duplicate word entries? I've tried storing the input as a string and a string array and still can't figure out how to perform this check. Any help would be appreciated!
posting the code might help.
also you could check if say stringarray[1] is equal to any other.
then check for 2
but that is very uneficient
sadly i don't know any other ways
just some beginners input on the idea here, isnt it possible to perform a check within the For loop , right after the user inputs "Break" , you can check if there is already an input like that in your string arrays before actually storing it to the next one, sorry if im intruding where i shouldnt, thought maybe it'd enlighten you a little on your case :)