Last active
August 29, 2015 14:04
-
-
Save AliceWaddicor/c12eacbc0a869c3a5beb to your computer and use it in GitHub Desktop.
Jack's boolean test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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