Hey there, new here, slowly learning the ins and outs of here and c#. I’m trying to understand the Contains command, but I don’t see what’s wrong with the following:
It returns incorrect when I type in the correct strings
C#:
Console.WriteLine("What are the reactants required for the first step of the citric acid cycle?");
answer = Console.ReadLine();
if (answer.Contains("Oxaloacetate" + "Acetyl CoA"))
{
Console.WriteLine("Correct");
}
else
{
Console.WriteLine("Incorrect");
}
Last edited by a moderator: