+ 4
MrDevEzeoke
You can store all string in an array and using loop you can check. If any string exist then break the loop.
https://code.sololearn.com/c677tEMtcmNK/?ref=app
+ 5
MrDevEzeoke , what you could do additionally is to spell the "keywords" in lower case:
string[] words = {"how", "where", "why", "when", "which"};
then also convert the input to lower case:
string question = Console.ReadLine().ToLower();
This makes it possible to find "Why" as well as "why" or whatever case is used.
+ 3
MrDevEzeoke
Can Contains accept multiple String?
+ 3
Or starting from the array of keywords you can combine Any() and Contains(). To use Any() you have to include Linq.
if(Keywords.Any(kw => question.Contains(kw)))