❔ In need of a way to process inputs to produce outputs, other than using hardcoded if statements
Hi all, I currently have a program that prompts the user to ask a question, then based on the parameters in the user's input, my code will output the answer to said question. However, as of right now I have it so my code is just using a lot of if statements and structured in a way which is
if (input.contains(arrayX[1]) && input.contains(arrayY[1])){Console.WriteLine("inset question answer here");}
if (input.contains(arrayX[1]) && input.contains(arrayY[1])){Console.WriteLine("inset question answer here");}
and I essentially have it all hardcoded for each input however this takes up so many lines of code so I was wondering if anybody could help me find a more efficient way of carrying out this process.