strGender = strGender.toLower();
if (strGender == "male" || strGender == "female")
; // do stuff
else
Console.WriteLine("Can you not answer a simple question?");
Assuming whatever language this is (C#?) has a sane implementation of strings that includes toLower and toUpper functions. if not, write your own toLower function that takes in a string and returns that string with every character modified to be lowercase. It makes your life easier. What if they type "MaLe" or "feMALE" etc.
and follow that up with
string strGenderYesNo = Console.ReadLine();
if(strGenderYesNo.toLower().startsWith('y'))
; // do what you need to do if they say yes
Once again, the startswith function may not exist in your language, but it probably does, and is also trivial to implement yourself. This way allows people to triple their productivity by only caring about the first letter. It's also faster computationally or whatever, but who cares about that.