I was creating an averaging program in C# just to make sure I got array's.
What I'm trying to do is ask the user if they want to average whole numbers, or non whole numbers. I thought an If statement would be appropriate.
But the problem is, I dont know what operator to use for MULTIPLE conditions, I think this is best explained by seeing the code. (Even I'm getting confused now D:)
Console.WriteLine("\n Do you want to average whole numbers, or non-whole numbers? \n");
if (Console.ReadLine() == "whole numbers" && Console.ReadLine() == "Whole numbers")
{
Console.WriteLine("You chose whole numbers.");
}
My confusion occurs at the "Condition" && "Condition2" bit. I don't know if && is the correct operator, and C# certainly doesn't think so!
I've looked across the C# MSDN Operator list, but couldn't really understand which one to use...
P.S: The whole reason I'm doing the multiple conditions is because of capital letters ETC, if any of you knew how to combat that with a way to disregard caps and other error prone user ticks, then please tell me :D