Skip to content

Instantly share code, notes, and snippets.

@AliceWaddicor
Last active August 29, 2015 14:04
Show Gist options
  • Save AliceWaddicor/c12eacbc0a869c3a5beb to your computer and use it in GitHub Desktop.
Save AliceWaddicor/c12eacbc0a869c3a5beb to your computer and use it in GitHub Desktop.
Jack's boolean test
Boolean a = false;
Boolean b = true;
if (!a)
{
Console.WriteLine("a is false");
}
if (!b)
{
Console.WriteLine("b is false");
}
if (a && b)
{
Console.WriteLine("a is true and b is true");
}
if (!(a && b))
{
Console.WriteLine("It's not the case that a is true and b is true");
}
if (a || b)
{
Console.WriteLine("a is true or b is true");
}
if (!(a || b))
{
Console.WriteLine("It's not the case that a is true or b is true");
}
if ((!a && b))
{
Console.WriteLine("a is false and b is true");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment